Skip to content

Commit

Permalink
fix: Forward user-defined location.state
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Jan 2, 2025
1 parent 06e3f7a commit 3ff4dcf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/nuqs/src/adapters/lib/react-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type NavigateUrl = {
type NavigateOptions = {
replace?: boolean
preventScrollReset?: boolean
state?: unknown
}
type NavigateFn = (url: NavigateUrl, options: NavigateOptions) => void
type UseNavigate = () => NavigateFn
Expand Down Expand Up @@ -60,7 +61,8 @@ export function createReactRouterBasedAdapter(
},
{
replace: true,
preventScrollReset: true
preventScrollReset: true,
state: history.state?.usr
}
)
}
Expand Down

0 comments on commit 3ff4dcf

Please sign in to comment.