ESLint, Babel and Prettier all have their own config files in the root of the project. Same for Jest and stylelint.
While you can include the reducer statically in reducers.js
, we don't recommend this as you lose
the benefits of code splitting. Instead, add it as a composed reducer. This means that you
pass actions onward to a second reducer from a lower-level route reducer like so:
// Main route reducer
function myReducerOfRoute(state, action) {
switch (action.type) {
case SOME_OTHER_ACTION:
return someOtherReducer(state, action);
}
}
That way, you still get the code splitting at route level, but avoid having a static combineReducers
call that includes all of them by default.
See this and the following lesson of the egghead.io Redux course for more information about reducer composition!
While it's possible to keep your project up-to-date or "in sync" with react-native-boiler-plate
, it's usually
very difficult and is therefore at your own risk and not recommended. You should not need to do it either, as
every version you use will be amazing! There is a long term goal to make this much easier but no ETA at the moment.
Submit an issue