-
Notifications
You must be signed in to change notification settings - Fork 13
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
Allow to set router's futures #76
Comments
@artaommahe Can you try the canary version ?
|
@JesusTheHun just checked - the change in this version covers only RouterProvider`s future field, but doesn't cover createBrowserRouter's future field, that has much more flags to be set to suppress those annoying warnings. Our current futures setup for the app to suppress all warnings looks like this const router = createBrowserRouter([/* routes list */], {
future: {
v7_relativeSplatPath: true,
v7_fetcherPersist: true,
v7_normalizeFormMethod: true,
v7_partialHydration: true,
v7_skipActionErrorRevalidation: true,
},
});
<RouterProvider
router={router}
future={{
v7_startTransition: true,
}}
/> also the typings for the implemented |
Hey @artaommahe 👋 can you give a try to the latest canary please ? npm i [email protected] |
@JesusTheHun now it works properly for futures passed to the |
@artaommahe Oh ok. They gave the same name to two different interfaces. npm i [email protected] |
@JesusTheHun we've already updated to v7 😅 |
Is your feature request related to a problem? Please describe.
Since version 6.28.0 react-router-dom spams a lot of warnings about enabling v7 futures in console. storybook-addon-remix-react-router provides no way so set them
Describe the solution you'd like
Add
futures
object toreactRouter
storybook options and pass it to the react-router-dom.Describe alternatives you've considered
-
Additional context
https://reactrouter.com/en/6.27.0/upgrading/future#update-to-latest-v6x
remix-run/react-router#12245
The text was updated successfully, but these errors were encountered: