Skip to content

Commit ad45f83

Browse files
authored
Use react concurrent mode state in RouterProvider (#10553)
* Use react concurrent mode state in RouterProvider * Bum bundle
1 parent 981dda7 commit ad45f83

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.changeset/young-glasses-smoke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": patch
3+
---
4+
5+
[internal] use concurrent mode state

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
"none": "12.0 kB"
122122
},
123123
"packages/react-router-dom/dist/umd/react-router-dom.production.min.js": {
124-
"none": "17.9 kB"
124+
"none": "18.0 kB"
125125
}
126126
}
127127
}

packages/react-router/lib/components.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ export function RouterProvider({
116116
<DataRouterContext.Provider value={dataRouterContext}>
117117
<DataRouterStateContext.Provider value={state}>
118118
<Router
119-
basename={router.basename}
120-
location={router.state.location}
121-
navigationType={router.state.historyAction}
119+
basename={basename}
120+
location={state.location}
121+
navigationType={state.historyAction}
122122
navigator={navigator}
123123
>
124-
{router.state.initialized ? (
124+
{state.initialized ? (
125125
<DataRoutes routes={router.routes} state={state} />
126126
) : (
127127
fallbackElement

0 commit comments

Comments
 (0)