Skip to content

Commit 86f4c63

Browse files
authored
chore: use startTransition futureflag (#105)
1 parent 816d355 commit 86f4c63

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apollo-client/v3/suspense-hooks/src/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const root = ReactDOM.createRoot(
2020
root.render(
2121
<React.StrictMode>
2222
<ApolloProvider client={client}>
23-
<Router>
23+
<Router future={{ v7_startTransition: true }}>
2424
<Routes>
2525
<Route path="/" element={<Layout />}>
2626
{routes.map(({ path, Element }) => (

apollo-client/v3/suspense-hooks/src/layout.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Outlet, useLocation } from "react-router-dom";
1+
import { Link, Outlet, useLocation } from "react-router-dom";
22
import { routes } from "./routes";
33
import { useMemo } from "react";
44

@@ -29,8 +29,8 @@ export function Layout() {
2929
<ul>
3030
{routes.map(({ path, title }) => (
3131
<li key={path}>
32-
<a
33-
href={`/${path}`}
32+
<Link
33+
to={`/${path}`}
3434
dangerouslySetInnerHTML={{ __html: title }}
3535
/>
3636
</li>

0 commit comments

Comments
 (0)