Created
          December 5, 2017 02:00 
        
      - 
      
 - 
        
Save rafaellucio/2d1489519611875935a42f082481fffa to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import React from 'react' | |
| import { Provider } from 'react-redux' | |
| import { createStore } from 'redux' | |
| import CounterContainer from './Counter.container' | |
| const initialState = { | |
| count: 0 | |
| }; | |
| function reducer(state = initialState, action) { | |
| if (action.type === "INCREMENT") { | |
| return { | |
| count: state.count + 1 | |
| } | |
| } | |
| return state | |
| } | |
| const store = createStore(reducer) | |
| const App = () => ( | |
| <Provider store={store}> | |
| <CounterContainer /> | |
| </Provider> | |
| ) | |
| export default App | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment