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

reducer.js 617B

123456789101112131415161718192021222324252627
  1. import { ReducerRegistry } from '../base/redux';
  2. import { SET_FILMSTRIP_HOVERED, SET_FILMSTRIP_VISIBLE } from './actionTypes';
  3. const DEFAULT_STATE = {
  4. visible: true
  5. };
  6. ReducerRegistry.register(
  7. 'features/filmstrip',
  8. (state = DEFAULT_STATE, action) => {
  9. switch (action.type) {
  10. case SET_FILMSTRIP_HOVERED:
  11. return {
  12. ...state,
  13. hovered: action.hovered
  14. };
  15. case SET_FILMSTRIP_VISIBLE:
  16. return {
  17. ...state,
  18. visible: action.visible
  19. };
  20. }
  21. return state;
  22. });