Redux changes and refactoring
This commit is contained in:
18
src/redux/reducers/common_reducer.js
Normal file
18
src/redux/reducers/common_reducer.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import {createReducer} from "redux-starter-kit";
|
||||
import {setApplicationReady} from "../actions/common_actions";
|
||||
|
||||
export const createCommonReducer = (platform, appPlatform, version) => {
|
||||
return createReducer({
|
||||
AppReady: false,
|
||||
AppPlatform: appPlatform,
|
||||
Platform: platform,
|
||||
Version: version,
|
||||
}, {
|
||||
[setApplicationReady]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
AppReady: action.payload,
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user