Skip to content

Commit 60e382a

Browse files
authored
Align UNSAFE history exports (#14663)
1 parent 7c73251 commit 60e382a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/friendly-moose-argue.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+
Export `UNSAFE_createMemoryHistory` and `UNSAFE_createHashHistory` alongside `UNSAFE_createBrowserHistory` for consistency. These are not intended to be used for new apps but intended to help apps usiong `unstable_HistoryRouter` migrate from v6->v7 so they can adopt the newer APIs.

packages/react-router/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,9 @@ export type {
349349

350350
/** @internal */
351351
export {
352+
createMemoryHistory as UNSAFE_createMemoryHistory,
352353
createBrowserHistory as UNSAFE_createBrowserHistory,
354+
createHashHistory as UNSAFE_createHashHistory,
353355
invariant as UNSAFE_invariant,
354356
} from "./lib/router/history";
355357

0 commit comments

Comments
 (0)