redux-react-router
redux-react-router copied to clipboard
Enable chosing different Routers.
Currently main component is plain Router component. With recent changes in React-router v6.4+ some hooks can only run if you are using data routers like createBrowserRouter
or BrowserRouter. Using embed Router component makes this library incompatible with new updates.
What's the update on that one? Thanks a lot!
bump on this one
I don't think it's possible. Because of new data APIs like loaders, actions, fetchers.
PR is welcome.
What are the full list of requirements for achieving this ?
Hi, is there any update on this one? 🙏
I am trying to use new router v6 hooks (e.g useBlocker) but they can be only used within Router that supports new data API (e.g RouterProvider) 😭
I tried to get around it by nesting <RouterProvider />
inside <ReduxRouter / >
👀 as someone tried here #20 but I ended with the same error 💁♀️ "You cannot render a <Router>
inside another <Router>
" (#20).
Looks that we cannot:
- use two Routers in one app
- use Router that support new data API because
<ReduxRouter / >
is based on plain Router component currently
I'm in the exact same position as @dannutiee. Migrating a fairly large application from router v5 to v6, and got everything working up until trying to use the new data API.
Same as @dannutiee .
added a PR two years ago but still didn't get merged. with react-router v2 it us unfortunately not possible to use redux-react-router so we decided to not use it anymore and dropped the dependency.