React Router Future Flag Warnings when rendering components with createRemixStub in @remix-run/testing #10216
Replies: 4 comments 5 replies
-
Yup, a bunch of behaviour is changing. You can update your code and opt in on the flags as you see fit https://reactrouter.com/en/6.28.0/upgrading/future#v7_skipactionerrorrevalidation |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
<Router You can try this on your App.tsx component. |
Beta Was this translation helpful? Give feedback.
-
Here is the documentation about this In short, add the following in your code, depending on what you use <BrowserRouter
future={{
v7_startTransition: true,
}}
/> Or, if you use Router Provider, <RouterProvider
future={{
v7_startTransition: true,
}}
/> You will also need to add the following to your createBrowserRouter(routes, {
future: {
v7_fetcherPersist: true,
v7_normalizeFormMethod: true,
v7_partialHydration: true,
v7_relativeSplatPath: true,
v7_skipActionErrorRevalidation: true,
v7_startTransition: true,
}
}); These are all the v7 flags. You may not need all of them depending on your app, but I've added them all just to be safe. |
Beta Was this translation helpful? Give feedback.
-
I'm integrating
createRemixStub
into a new project and am seeing a bunch of feature flag warnings when running tests that I can't figure out how to silence. Has anyone else encountered this?I'm using
"@remix-run/react": "^2.7.1"
and"@remix-run/testing": "^2.14.0"
Beta Was this translation helpful? Give feedback.
All reactions