Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

Add react-router data into action and reducer #68

Closed
vladimirbuskin opened this issue Dec 2, 2015 · 3 comments
Closed

Add react-router data into action and reducer #68

vladimirbuskin opened this issue Dec 2, 2015 · 3 comments

Comments

@vladimirbuskin
Copy link

Add react router data into action and reducer

components: Array[],
location: Object,
params: Object,
routes: Array[]

I make a commit, just to show my Idea

https://github.com/vladimirbuskin/redux-simple-router/commit/0c4240ba63efe1454fdb0b762b109a710c4e03f5

Can we add something like that into simple router, because i think it is significant.
Data is great in actions to use in middlewares, and usefull in state as well. For example will help to use router in
react-redux-universal-hot-example

what do you think?

@jlongster
Copy link
Member

Definitely not, sorry. If you want that, use redux-router. It complicates things significantly, and you should only be putting serializable dumb state in your app state. The idea of the project is that you should use react-router directly; you should use redux-router if you want a separate interface.

@jlongster
Copy link
Member

We're porting react-redux-universal-hot-example, and there's been little problems using react-router directly FWIW.

@vladimirbuskin
Copy link
Author

ok, yes, just realized that could be or should be done withing middleware
like
transitionMiddleware.js in react-redux-universal-hot-example

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

2 participants