content: import React from 'react';
  import ReactDOM from 'react-dom';
  import App from './containers/app/App';
  import './index.css';
  
  import { createStore } from 'redux'
  
  function counter(state = 0, action) {
    switch (action.type) {
    case 'INCREMENT':
      return state + 1
    case 'DECREMENT':
      return state - 1
    default:
      return state
    }
  }
  
  let store = createStore(counter)
  
  store.subscribe(() =>
    console.log(store.getState())
  )
  
  // The only way to mutate the internal state is to dispatch an action.
  // The actions can be serialized, logged or stored and later replayed.
  store.dispatch({ type: 'INCREMENT' })
  // 1
  store.dispatch({ type: 'INCREMENT' })
  // 2
  store.dispatch({ type: 'DECREMENT' })
  // 1
  
  ReactDOM.render(
    <App/>
    ,
    document.getElementById('root')
  );
  