1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
const { fromJS } = require('immutable'); const ACTION_TYPES = require('../actions/TYPES'); module.exports = (state, action) => { state = fromJS(state); switch (action.type) { case ACTION_TYPES.PAGE_FETCH_END: return fromJS(action.payload.config); default: return state; } };