Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

reducer.js 472B

1234567891011121314151617181920212223242526
  1. // @flow
  2. import { ReducerRegistry } from '../base/redux';
  3. import { BLUR_ENABLED, BLUR_DISABLED } from './actionTypes';
  4. ReducerRegistry.register('features/blur', (state = {}, action) => {
  5. switch (action.type) {
  6. case BLUR_ENABLED: {
  7. return {
  8. ...state,
  9. blurEnabled: true
  10. };
  11. }
  12. case BLUR_DISABLED: {
  13. return {
  14. ...state,
  15. blurEnabled: false
  16. };
  17. }
  18. }
  19. return state;
  20. });