Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

reducer.js 558B

12345678910111213141516171819202122
  1. import { ReducerRegistry, set } from '../redux';
  2. import { SET_ASPECT_RATIO } from './actionTypes';
  3. import { ASPECT_RATIO_NARROW } from './constants';
  4. /**
  5. * The initial redux state of the feature base/aspect-ratio.
  6. */
  7. const _INITIAL_STATE = {
  8. aspectRatio: ASPECT_RATIO_NARROW
  9. };
  10. ReducerRegistry.register(
  11. 'features/base/aspect-ratio',
  12. (state = _INITIAL_STATE, action) => {
  13. switch (action.type) {
  14. case SET_ASPECT_RATIO:
  15. return set(state, 'aspectRatio', action.aspectRatio);
  16. }
  17. return state;
  18. });