T
TanStack2y ago
ratty-blush

Can I use router.navigate to change routes outside of React context?

Hi! I've got a React app with a legacy navigation written in Knockout. Is it possible to trigger route update from outside of React context, e.g. when a user clicks a link in this Knockout navigation? Would it work if I imported the router object in my KO code and called router.navigate when the user clicks a link? We're currently using react-router library, but I'm thinking about migrating to this one. Just want to make sure this use case is supported before we start the migration.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?