Comments (4)
@dts this changed in the beta drops of 2.0, as i felt like it streamlined the process that users didn't need to know about redux-simple-router needing to be defined here, that the universal-redux library could handle it for you. how do you feel about it? i'm not entirely satisfied with it, and have been exploring other ways and may retract it before the official 2.0.
from universal-redux.
The ideal case, IMHO, is unfortunately the hardest one: do not require the redux-simple-router call, but allow the user to supply a normal Redux reducer function, as it maintains the API simplicity that makes redux so wonderful. Internally, it would look like this:
function universalReduxRootReducer(state,action) {
state = { state... , _routing: routerReducer(state._routing,action) };
state = userReducer(state,action);
}
from universal-redux.
@dts what you're desiring is a bit of a wrapper around the redux simple router, which i think i'd prefer to let the project developer decide how best to do. in which case, the newer API is too proscriptive, and I think it's best to return to a place where it's up to you how you and where you'd like to manage routeReducer
.
from universal-redux.
2.0.0-beta13 returns to the previous behavior, expecting user to return a combineReducers
object with redux-simple-router's routeReducer as one of them. An example: https://github.com/bdefore/universal-redux/blob/master/examples/jwt/src/redux/modules/index.js
from universal-redux.
Related Issues (20)
- onEnter can't redirect HOT 1
- How to access external server api (rails or laravel ... etc) from universal-redux?
- [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
- how the server side API requests handle the jwt token?
- Move to redux-connect HOT 1
- Help required?
- Question about waiting for Server Requests HOT 1
- Question about โAdd routes, reducer and rootClientComponent aliases so that client has access to themโ HOT 5
- Setting scroll behavior for the router
- SVG Loading Configuration
- Different CSS idents cause server render to be discarded HOT 1
- Using npm dependencies listed in Universal-redux on the project level HOT 3
- [webpack-isomorphic-tools] asset not found HOT 9
- Question: how to alter the JS loader HOT 4
- Passing Express request headers to Html component?
- @@router/UPDATE_LOCATION fired after first dispatched action HOT 3
- Server-side React render was discarded HOT 5
- Use redux-devtools-extension HOT 1
- integrate HappyPack
- should user other way to compile es6-7 with babel
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from universal-redux.