mirror of
https://github.com/strapi/strapi.git
synced 2025-08-15 20:27:23 +00:00
26 lines
537 B
JavaScript
26 lines
537 B
JavaScript
/*
|
|
* Reducer
|
|
*
|
|
* The reducer takes care of our data. Using actions, we can change our
|
|
* application state.
|
|
* To add a new action, add it to the switch statement in the reducer function
|
|
*
|
|
* Example:
|
|
* case YOUR_ACTION_CONSTANT:
|
|
* return state.set('yourStateVariable', true);
|
|
*/
|
|
|
|
import { fromJS } from 'immutable';
|
|
|
|
// The initial state of the App
|
|
const initialState = fromJS({});
|
|
|
|
function appReducer(state = initialState, action) {
|
|
switch (action.type) {
|
|
default:
|
|
return state;
|
|
}
|
|
}
|
|
|
|
export default appReducer;
|