Closed imgnx closed 4 years ago
Not a silly question, I created this package when I was migrating an app using react-router-redux
to Next.js which relied on the router state being in Redux. The library has actions for navigating in order to keep a similar API to connected-react-router
or react-router-redux
, see https://github.com/reactjs/react-router-redux#what-if-i-want-to-issue-navigation-events-via-redux-actions, and also to ease migration.
The library just calls Router[method]
when you dispatch a navigation action, so if that's the only thing you were using it for, I would agree it's not needed .
This might be a silly question, but I installed this package from npm without realizing that I can just use
import Router from 'next/router'
andRouter.push('/home')
to switch routes from inside an action. So, what is the point of this package?😂