W
W
webe2018-06-24 02:07:12
React
webe, 2018-06-24 02:07:12

How to sync react router v4 with redux now?

How to sync react router v4 with redux now?
What is currently used for synchronization?
Installed myself, but something can not start.
"react-redux": "^5.0.7",
"react-router-dom": "^4.3.1",
"react-router-redux": "^4.0.8",
googled it, it looks like they can only be used buggy 5.alpha version of react-router-redux
but something is somehow not very good, as I understand the project has died and now they use something else for synchronization?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
codefln, 2018-06-24
@webe

I set myself 5.alpha

package.json
"react-redux": "^5.0.7",
"react-router-dom": "^4.2.2",
"react-router-redux": "5.0.0-alpha.9"

Then you wrap it in index:
import { ConnectedRouter } from 'react-router-redux'
<ConnectedRouter history={history}>
<App />
</ConnectedRouter>

History must be thrown.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question