react-router-dom@6.4.0-pre.10
Pre-release
Pre-release
Patch Changes
-
SSR Updates for React Router (#9058)
Note: The Data-Router SSR aspects of
@remix-run/routerandreact-router-domare being released as unstable in this release (unstable_createStaticHandlerandunstable_DataStaticRouter), and we plan to finalize them in a subsequent minor release once the kinks can be worked out with the Remix integration. To that end, they are available for use, but are subject to breaking changes in the next minor release.- Remove
useRenderDataRouter()in favor of<DataRouterProvider>/<DataRouter> - Support automatic hydration in
<DataStaticRouter>/<DataBrowserRouter>/<DataHashRouter>- Uses
window.__staticRouterHydrationData - Can be disabled on the server via
<DataStaticRouter hydrate={false}> - Can be disabled (or overridden) in the browser by passing
hydrationDatato<DataBrowserRouter>/<DataHashRouter>
- Uses
<DataStaticRouter>now tracks it's own SSR error boundaries onStaticHandlerContextStaticHandlerContextnow exposesstatusCode/loaderHeaders/actionHeadersfoundMissingHydrationDatacheck removed since Remix routes may have loaders (for modules) that don't return data forloaderData
- Remove
-
Updated dependencies
- react-router@6.4.0-pre.10