-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: react-router-dom@6.28 shows v7_startTransition warning but such future flag is not present #12245
Comments
I was able to resolve this by placing the const router = createBrowserRouter(...);
...
return <RouterProvider router={router} future={{ v7_startTransition: true }} /> |
Hey! Thanks for the answer. I have set as you mentioned, however the warning message still does not hide. Any help would be highly appreciated! Here is the code sample from my app: export const AppRouter = () => {
const router = React.useMemo(() => createAppRouter(), []);
return (
<RouterProvider
router={router}
future={{
v7_startTransition: true,
}}
/>
);
}; |
UPDATE! Apparently I had multiple v7 future update warnings. So, I followed the react-router doc on future flags. Had to add couple more flags to createBrowserRouter. Here is the example: const createBrowserRouter = {routes, {future: {
v7_fetcherPersist: true,
v7_normalizeFormMethod: true,
v7_partialHydration: true,
v7_relativeSplatPath: true,
v7_skipActionErrorRevalidation: true,
},
} This seems to have fixed the warning messages. |
in typescript, I am not seeing anything other than v7 transition flag. version issue ? |
It's really terrible. It's necessary to mute the warning in any case .... |
This is bad. It shouldn't be outputting such warning at all❗ Had to add such options object to {
future: {
v7_fetcherPersist: true,
v7_normalizeFormMethod: true,
v7_partialHydration: true,
v7_relativeSplatPath: true,
v7_skipActionErrorRevalidation: true,
},
} And set <RouterProvider router={router} future={{ v7_startTransition: true }} /> |
// create root router
const router = createBrowserRouter([...PublicRouter, ...PrivateRouter], {
future: {
v7_relativeSplatPath: true,
v7_fetcherPersist: true,
v7_normalizeFormMethod: true,
v7_partialHydration: true,
v7_startTransition: true,
v7_skipActionStatusRevalidation: true,
},
}); Though this two are not working, still showing warning in conse { v7_startTransition: true, details in official docs https://reactrouter.com/en/6.28.0/upgrading/future |
These settings worked for me: { <RouterProvider |
Here is the code sample from my application
|
Where do I put these code snippets in my Vite app? |
you have to write those code where you are defining BrowserRouter or createBrowserRouter |
Sorry for the noob question. I created a project with |
I hope this comes across as constructive criticism, but it seems to me a very unfortunate developer experience to have a library that by design requires multiple lines of random flags be inserted in different places just to silence browser console spam. Surely this can be handled in a different way? |
We cannot upgrade to react 18, yet, due to other dependencies and this means we CANNOT get rid of all these warnings other than patching your library. I would appreciate an option to tell your library: "Yes, I've seen this once, be quiet now." |
Added feature request for an opt-out: #12321 |
Ditto to @mdr. I'm new to react-router and was working through a tutorial. This was an unfortunate introduction to the project. I was forced to add cruft to the code to enable the feature flags (disabling them doesn't seem to work) just to make debugging easier. Now I'm crossing my fingers and hoping that some beta features that I don't care about (being new) don't cause unwanted side-effects. |
When we add |
What version of React Router are you using?
6.28
Steps to Reproduce
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: