text: import ReactDOM from 'react-dom'
  import { createStore } from 'redux'
  
  const counterReducer = (state = 0, action) => {
    switch (action.type) {
      case 'INCREMENT': 
        console.log(state)
        return state + 1
      case 'DECREMENT': 
        console.log(state)
        return state - 1
      case 'ZERO': 
        console.log(state)
        return 0
      default: 
        console.log(state)
        return state
    }
  }
  
  const store = createStore(counterReducer)
  
  const App = () => {
    return (
      <div>
        <div>
          {store.getState()}
        </div>
        <button 
          onClick={e => store.dispatch({ type: 'INCREMENT' })}
        >
          plus
        </button>
        <button
          onClick={e => store.dispatch({ type: 'DECREMENT' })}
        >
          minus
        </button>
        <button 
          onClick={e => store.dispatch({ type: 'ZERO' })}
        >
          zero
        </button>
      </div>
    )
  }
  
  const renderApp = () => {
    ReactDOM.render(<App />, document.getElementById('root'))
  }
  
  renderApp()
  store.subscribe(renderApp)
  
  export default App;
  