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

reducer.native.js 641B

12345678910111213141516171819202122
  1. import { ReducerRegistry } from '../base/redux';
  2. import { _ROOT_NAVIGATION_READY } from '../mobile/navigation/actionTypes';
  3. /**
  4. * Listen for actions which changes the state of the app feature.
  5. *
  6. * @param {Object} state - The Redux state of the feature features/app.
  7. * @param {Object} action - Action object.
  8. * @param {string} action.type - Type of action.
  9. * @returns {Object}
  10. */
  11. ReducerRegistry.register('features/app', (state = {}, action) => {
  12. switch (action.type) {
  13. case _ROOT_NAVIGATION_READY:
  14. return {
  15. ...state,
  16. ready: action.ready
  17. };
  18. default:
  19. return state;
  20. }
  21. });