Skip to content
This repository has been archived by the owner on Nov 10, 2021. It is now read-only.

How to use with Router? E.g. connected-react-router? #49

Closed
ghost opened this issue Apr 3, 2019 · 1 comment
Closed

How to use with Router? E.g. connected-react-router? #49

ghost opened this issue Apr 3, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 3, 2019

I'm using redux-react-hook with react-router-dom which works fine. Now I want to connect the router to Redux, such that it dispatches actions when I'm routing and give me the ability to route using actions.

Previously I'd use connected-react-router for that, but that's dependent on react-redux.

Is this possible?

@ianobermiller
Copy link
Contributor

You'll have to find another option that doesn't tie into react-redux, or just use a hook like https://github.com/CharlesStover/use-react-router to access the route data. Alternatively, just keep using react-redux and connected-react-router to get it into the store, but use redux-react-hook for actually accessing the store.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant