Ejemplo n.º 1
0
 function rootReducer(state = {}, action) {
   return {
     routing: routerReducer(state.routing, action),
     codeViewer: codeViewerReducer(state.codeViewer, action),
     sandbox: sandboxReducer(state.sandbox, action),
     sections: sectionsReducer(state.sections, action),
   };
 }
Ejemplo n.º 2
0
  return (state = {}, action) => {

    return {
      meta: reducerWraper(metaHandlers, state.meta, action, ctx),
      albums: reducerWraper(albumHandlers, state.albums, action, ctx),
      resources: reducerWraper(resHandlers, state.resources, action, ctx),
      routing: routerReducer(state.routing, action),
      config: state.config,
    }
  }
Ejemplo n.º 3
0
addReducer(LOCATION_CHANGE, function(state, action) {
  var newRouteState = routerReducer(state.routing, action);
  if (newRouteState === state.routing) {
    return state;
  } else {
    return Object.assign({}, state, {
      routing: newRouteState
    });
  }
});
Ejemplo n.º 4
0
Archivo: index.js Proyecto: jin/NUSMods
export default function (state: State = defaultState, action: FSA) {
  return {
    entities: entities(state.entities, action),
    requests: requests(state.requests, action),
    timetables: timetables(state.timetables, action, state.entities),
    routing: routerReducer(state.routing, action),
    app: app(state.app, action),
    theme: theme(state.theme, action),
    settings: settings(state.settings, action),
  };
}
Ejemplo n.º 5
0
const masterReducer = (state = {}, action) => {
  let nextState = rootReducer(state, action);
  const nextRouting = routerReducer(state.routing, action);
  if (nextRouting !== nextState.routing) {
    nextState = {
      ...nextState,
      routing: nextRouting,
    };
  }
  return nextState;
};
Ejemplo n.º 6
0
export default (state = initialState, action) => {
  if (action.type === LOCATION_CHANGE) {
    return routerReducer(state, action);
  }
  return state;
};
Ejemplo n.º 7
0
 function rootReducer(state = {}, action) {
   return {
     routing: routerReducer(state.routing, action),
   };
 }