You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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. });