Skip to content

Instantly share code, notes, and snippets.

@rafaellucio
Created December 5, 2017 02:00
Show Gist options
  • Save rafaellucio/2d1489519611875935a42f082481fffa to your computer and use it in GitHub Desktop.
Save rafaellucio/2d1489519611875935a42f082481fffa to your computer and use it in GitHub Desktop.
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