React Router Future Flag Warnings when rendering components with createRemixStub in @remix-run/testing #10216
Replies: 8 comments 19 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.
-
React Router ConfigurationThe following code demonstrates how to configure a <Router
future={{
v7_startTransition: true,
v7_relativeSplatPath: true,
}}
>
</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've been experiencing this too, especially during jest unit tests. The router used during unit tests get all the same future feature flags (mentioned above), but complains a lot in the jest environment. I'm just not seeing how to suppress them. Any pointers? |
Beta Was this translation helpful? Give feedback.
-
I have a similar issue with this after upgrading to the latest version. |
Beta Was this translation helpful? Give feedback.
-
I am also facing this error. I used RouterProvider, and the future prop has the type: However, I have more than one warning. In
This fixed my warning
Node : It is not directly related to remix. |
Beta Was this translation helpful? Give feedback.
-
FYI this output is also appearing when running Remix's own
|
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