Skip to content

Commit f3182f4

Browse files
committed
Add changeset for SSR changes
1 parent a460b63 commit f3182f4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.changeset/tricky-falcons-peel.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
"react-router": patch
3+
"react-router-dom": patch
4+
"@remix-run/router": patch
5+
---
6+
7+
SSR Updates for React Router
8+
9+
_Note: The Data-Router SSR aspects of `@remix-run/router` and `react-router-dom` are being released as **unstable** in this release (`unstable_createStaticHandler` and `unstable_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._
10+
11+
- Remove `useRenderDataRouter()` in favor of `<DataRouterProvider>`/`<DataRouter>`
12+
- Support automatic hydration in `<DataStaticRouter>`/`<DataBrowserRouter>`/`<DataHashRouter>`
13+
- Uses `window.__staticRouterHydrationData`
14+
- Can be disabled on the server via `<DataStaticRouter hydrate={false}>`
15+
- Can be disabled (or overridden) in the browser by passing `hydrationData` to `<DataBrowserRouter>`/`<DataHashRouter>`
16+
- `<DataStaticRouter>` now tracks it's own SSR error boundaries on `StaticHandlerContext`
17+
- `StaticHandlerContext` now exposes `statusCode`/`loaderHeaders`/`actionHeaders`
18+
- `foundMissingHydrationData` check removed since Remix routes may have loaders (for modules) that don't return data for `loaderData`

0 commit comments

Comments
 (0)