Skip to content

Commit eb39f7d

Browse files
chore: Update version for release (pre) (#9088)
* chore: Update version for release (pre) * Update changelogs * Fix SSR example Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Brophy <[email protected]>
1 parent f3182f4 commit eb39f7d

File tree

15 files changed

+173
-46
lines changed

15 files changed

+173
-46
lines changed

.changeset/ninety-spoons-suffer.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
"react-router": patch
32
"react-router-dom": patch
43
"@remix-run/router": patch
54
---
@@ -15,7 +14,7 @@ feat: Add `createStaticRouter` for `@remix-run/router` SSR usage
1514

1615
```jsx
1716
// Create a static handler
18-
let { dataRoutes, query } = unstable_createStaticHandler(routes);
17+
let { query } = unstable_createStaticHandler(routes);
1918

2019
// Perform a full-document query for the incoming Fetch Request. This will
2120
// execute the appropriate action/loaders and return either the state or a
@@ -30,16 +29,9 @@ if (state instanceof Response) {
3029
// Otherwise, render our application providing the data routes and state
3130
let html = ReactDOMServer.renderToString(
3231
<React.StrictMode>
33-
<DataStaticRouter dataRoutes={dataRoutes} state={state} />
32+
<DataStaticRouter routes={routes} state={state} />
3433
</React.StrictMode>
3534
);
36-
37-
// Grab the hydrationData to send to the client for <DataBrowserRouter>
38-
let hydrationData = {
39-
loaderData: state.loaderData,
40-
actionData: state.actionData,
41-
errors: state.errors,
42-
};
4335
```
4436

4537
**Example usage (Data Requests):**

.changeset/pre.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
"gold-trains-rhyme",
2222
"light-months-argue",
2323
"lovely-tomatoes-smoke",
24+
"new-kiwis-burn",
2425
"nine-stingrays-arrive",
26+
"ninety-spoons-suffer",
2527
"odd-yaks-kneel",
2628
"silver-planes-relate",
2729
"sixty-otters-teach",
@@ -32,6 +34,7 @@
3234
"thick-lions-taste",
3335
"thirty-monkeys-cheer",
3436
"tough-zoos-cry",
37+
"tricky-falcons-peel",
3538
"unlucky-cows-rhyme",
3639
"weak-seas-kiss"
3740
]

examples/ssr-data-router/package-lock.json

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/ssr-data-router/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
},
1313
"dependencies": {
1414
"@remix-run/node": "^1.5.1",
15-
"@remix-run/router": "^0.2.0-pre.2",
15+
"@remix-run/router": "^0.2.0-pre.4",
1616
"compression": "1.7.4",
1717
"cross-env": "^7.0.3",
1818
"express": "^4.17.1",
1919
"history": "^5.2.0",
2020
"react": "^18.2.0",
2121
"react-dom": "^18.2.0",
22-
"react-router-dom": "^6.4.0-pre.7"
22+
"react-router-dom": "^6.4.0-pre.9"
2323
},
2424
"devDependencies": {
2525
"@rollup/plugin-replace": "^3.0.0",

examples/ssr-data-router/src/entry.server.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type * as express from "express";
22
import { unstable_createStaticHandler } from "@remix-run/router";
33
import * as React from "react";
44
import ReactDOMServer from "react-dom/server";
5-
import { unstable_ as DataStaticRouter } from "react-router-dom/server";
5+
import { unstable_DataStaticRouter as DataStaticRouter } from "react-router-dom/server";
66
import { routes } from "./App";
77

88
export async function render(request: express.Request) {

packages/react-router-dom-v5-compat/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# react-router-dom-v5-compat
22

3+
## 6.4.0-pre.10
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
9+
10+
311
## 6.4.0-pre.9
412

513
### Patch Changes

packages/react-router-dom-v5-compat/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-dom-v5-compat",
3-
"version": "6.4.0-pre.9",
3+
"version": "6.4.0-pre.10",
44
"description": "Migration path to React Router v6 from v4/5",
55
"keywords": [
66
"react",
@@ -24,7 +24,7 @@
2424
"types": "./dist/index.d.ts",
2525
"dependencies": {
2626
"history": "^5.3.0",
27-
"react-router": "6.4.0-pre.9"
27+
"react-router": "6.4.0-pre.10"
2828
},
2929
"peerDependencies": {
3030
"react": ">=16.8",

packages/react-router-dom/CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# react-router-dom
22

3+
## 6.4.0-pre.10
4+
5+
### Patch Changes
6+
7+
- SSR Updates for React Router (#9058)
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`
19+
20+
- Updated dependencies
21+
22+
323
## 6.4.0-pre.9
424

525
### Patch Changes

packages/react-router-dom/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-dom",
3-
"version": "6.4.0-pre.9",
3+
"version": "6.4.0-pre.10",
44
"description": "Declarative routing for React web applications",
55
"keywords": [
66
"react",
@@ -23,7 +23,7 @@
2323
"module": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
2525
"dependencies": {
26-
"react-router": "6.4.0-pre.9"
26+
"react-router": "6.4.0-pre.10"
2727
},
2828
"devDependencies": {
2929
"react": "^17.0.2",

packages/react-router-native/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# react-router-native
22

3+
## 6.4.0-pre.10
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
9+
310
## 6.4.0-pre.9
411

512
### Patch Changes

0 commit comments

Comments
 (0)