github remix-run/react-router react-router@6.10.0

latest releases: react-router@6.28.0, v0.0.0-nightly-1b103a82e-20241110, v0.0.0-nightly-3acc86586-20241109...
19 months ago

What's Changed

We recently published a post over on the Remix Blog titled "Future Proofing Your Remix App" that goes through our strategy to ensure smooth upgrades for your Remix and React Router apps going forward. React Router 6.10.0 adds support for these flags (for data routers) which you can specify when you create your router:

const router = createBrowserRouter(routes, {
  future: {
    // specify future flags here
  },
});

You can also check out the docs here and here.

Minor Changes

  • The first future flag being introduced is future.v7_normalizeFormMethod which will normalize the exposed useNavigation()/useFetcher() formMethod fields as uppercase HTTP methods to align with the fetch() (and some Remix) behavior. (#10207)

    • When future.v7_normalizeFormMethod is unspecified or set to false (default v6 behavior),
      • useNavigation().formMethod is lowercase
      • useFetcher().formMethod is lowercase
    • When future.v7_normalizeFormMethod === true:
      • useNavigation().formMethod is UPPERCASE
      • useFetcher().formMethod is UPPERCASE

Patch Changes

  • Fix createStaticHandler to also check for ErrorBoundary on routes in addition to errorElement (#10190)
  • Fix route ID generation when using Fragments in createRoutesFromElements (#10193)
  • Provide fetcher submission to shouldRevalidate if the fetcher action redirects (#10208)
  • Properly handle lazy() errors during router initialization (#10201)
  • Remove instanceof check for DeferredData to be resilient to ESM/CJS boundaries in SSR bundling scenarios (#10247)
  • Update to latest @remix-run/web-fetch@4.3.3 (#10216)

Full Changelog: https://github.com/remix-run/react-router/compare/react-router@6.9.0...react-router@6.10.0

Don't miss a new react-router release

NewReleases is sending notifications on new releases.