Skip to content

Commit 7dfc60e

Browse files
authored
feat(react-router): re-export useBlocker and useBeforeUnload (#5181)
Closes: equinor/fusion#888
1 parent ceaf26a commit 7dfc60e

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@equinor/fusion-framework-react-router": minor
3+
---
4+
5+
Re-export `useBlocker` and `useBeforeUnload` from `react-router` so consumers migrating from `react-router-dom` don't need a direct dependency on `react-router` for these hooks.
6+
7+
Thanks @edmondbaloku
8+
9+
Closes: https://github.com/equinor/fusion/issues/888

packages/react/router/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ export {
3939
type PathParam,
4040
type SetURLSearchParams,
4141
useActionData,
42+
useBeforeUnload,
43+
useBlocker,
4244
useFormAction,
4345
useLocation,
4446
useLoaderData,

0 commit comments

Comments
 (0)