您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

reducer.js 564B

1234567891011121314151617181920212223
  1. import { ReducerRegistry } from '../base/redux';
  2. import { SET_SIDEBAR_VISIBILITY } from './actionTypes';
  3. const DEFAULT_STATE = {
  4. sideBarVisible: false
  5. };
  6. /**
  7. * Reduces the Redux actions of the feature features/recording.
  8. */
  9. ReducerRegistry.register('features/welcome',
  10. (state = DEFAULT_STATE, action) => {
  11. switch (action.type) {
  12. case SET_SIDEBAR_VISIBILITY:
  13. return {
  14. ...state,
  15. sideBarVisible: action.sideBarVisible
  16. };
  17. default:
  18. return state;
  19. }
  20. });