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 3, 2025
1 parent ac9abdd commit 1e72e95
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 1e72e95

Please sign in to comment.