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

reducer.js 580B

123456789101112131415161718192021222324252627
  1. // @flow
  2. import { PersistenceRegistry, ReducerRegistry } from '../base/redux';
  3. import { UPDATE_DROPBOX_TOKEN } from './actionTypes';
  4. /**
  5. * The redux subtree of this feature.
  6. */
  7. const STORE_NAME = 'features/dropbox';
  8. /**
  9. * Sets up the persistence of the feature {@code dropbox}.
  10. */
  11. PersistenceRegistry.register(STORE_NAME);
  12. ReducerRegistry.register(STORE_NAME, (state = {}, action) => {
  13. switch (action.type) {
  14. case UPDATE_DROPBOX_TOKEN:
  15. return {
  16. ...state,
  17. token: action.token
  18. };
  19. default:
  20. return state;
  21. }
  22. });