confusion about versions, coming changes, so on
I've searched for a while and am still very confused, sorry if this has been answered well somewhere.
The code in the README on the master branch doesn't seem to work if you use npm install redux-simple-router --save. There are currently two branches, master and another-cycles-idea, and it's not clear to me which one is the more updated version and which API I should be using.
For example, I'm currently using dispatch(pushPath('/url')) but should I be using dispatch(routeActions.push('/foo')) instead as in the readme? Various different boilerplates I've found that use redux-simple-router also use different versions and it's very confusing.
Furthermore, my understanding is that redux-simple-router is the 'officially' recommended one to use with redux, as it's been moved to the rackt repo on github, but the Real World example on http://rackt.org/redux/docs/introduction/Examples.html uses redux-router.
Can someone please clarify what people who want redux-simple-router today should use?
You just hit the bleeding edge. redux-simple-router in its current form has been released yesterday in version 2.0.2 and today again as 2.0.3. The transition to rackt has been made within the last month.
Before that redux-router was the only routing solution for redux (at least the only one I know of). Unfortunately redux-router is not so actively maintained. You can find the relevant discussion here.
So you are confrontend with a transition phase, which should explain why many examples still refer to redux-router. You should find up-to-date examples in the readme of this project. See here
I have downloaded 2.0.3 version, navigated to examples/basic and executed npm install and npm start but it failed with compilation error
Module build failed: SyntaxError: <path>/src/index.js: Unexpected token (41:11)
After I removed "extra lines" from webpack config, webpack started but browser complained about missing function listenForReplays.
What can be wrong?
I just nuked that other branch. It was something James was exploring, but we went with another option for 2.0.
The current docs line up with the current version. If they're not matching up, then you have the wrong version installed or cached or something.
The redux example needs to be updated. Since 2.0 is out, now is a good time to do that. A PR would be really appreciated over there! :smile: