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

reducer.js 542B

1234567891011121314151617181920212223242526272829
  1. // @flow
  2. import {
  3. PROFILE_UPDATED
  4. } from './actionTypes';
  5. import { PersistencyRegistry, ReducerRegistry } from '../redux';
  6. const DEFAULT_STATE = {
  7. profile: {}
  8. };
  9. const STORE_NAME = 'features/base/profile';
  10. PersistencyRegistry.register(STORE_NAME, {
  11. profile: true
  12. });
  13. ReducerRegistry.register(
  14. STORE_NAME, (state = DEFAULT_STATE, action) => {
  15. switch (action.type) {
  16. case PROFILE_UPDATED:
  17. return {
  18. profile: action.profile
  19. };
  20. }
  21. return state;
  22. });