-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #691 - auto-migrate persisted state when newer version requires it
- Loading branch information
Showing
6 changed files
with
4 additions
and
77 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,16 @@ | ||
import { combineReducers } from "redux"; | ||
|
||
import authReducer from "./reducers/auth.reducer"; | ||
import cacheReducer from "./reducers/cache.reducer"; | ||
import i18nReducer from "./reducers/i18n.reducer"; | ||
import networkReducer from "./reducers/network.reducer"; | ||
import requestReducer from "./reducers/request.reducer"; | ||
import userReducer from "./reducers/user.reducer"; | ||
|
||
//import * as actions from "./rootActions"; | ||
|
||
//const combinedReducers = combineReducers({ | ||
const rootReducer = combineReducers({ | ||
authReducer, | ||
i18nReducer, | ||
networkReducer, | ||
requestReducer, | ||
userReducer, | ||
cacheReducer, | ||
}); | ||
|
||
// Handling REINITIALIZE_REDUX in each individual reducer reducer is better bc we can reset to initialState rather than completely undefined | ||
/* | ||
const rootReducer = (state, action) => { | ||
switch (action.type) { | ||
//case REHYDRATE: | ||
// return state; | ||
// Clear all data in redux store (reset to initial) | ||
case actions.REINITIALIZE_REDUX: | ||
return state = undefined; | ||
default: | ||
return combinedReducers(state, action); | ||
}; | ||
}; | ||
*/ | ||
export default rootReducer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters