Sha256: 5f77f7c5db76d1040c8ad9b4bdec2166a1a07245048d3d0cc5b8efd9c67b4645

Contents?: true

Size: 499 Bytes

Versions: 1

Compression:

Stored size: 499 Bytes

Contents

import Immutable from 'immutable';

import actionTypes from '../constants/helloWorldConstants';

export const $$initialState = Immutable.fromJS({
  name: '', // this is the default state that would be used if one were not passed into the store
});

export default function helloWorldReducer($$state = $$initialState, action) {
  const { type, name } = action;

  switch (type) {
  case actionTypes.HELLO_WORLD_NAME_UPDATE:
    return $$state.set('name', name);

  default:
    return $$state;
  }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
react_on_rails-2.0.0.rc.1 lib/generators/react_on_rails/templates/redux/base/client/app/bundles/HelloWorld/reducers/helloWorldReducer.jsx