react-router migration: history.subscribe() in TanStack #898
Unanswered
karuifeather
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Correct, there is no action (yet), but you can just do this: const unsubFn = history.subscribe(() => { |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I was just trying out TanStack's router as an alternative to react-router due to the breaking changes from v5 to v6 that broke my app.
My question is how do I achieve something like this with the new router.
I noticed, unlike with the history object from the
history
library, callback tohistory.subscribe()
does not get passed any parameters. Maybe I'm missing something very basic but I just want to pass thelocation
object back to the callback function.onNavigate
is the callback function.Beta Was this translation helpful? Give feedback.
All reactions