Skip to content

Instantly share code, notes, and snippets.

@StevenJL
Last active March 20, 2017 23:13
Show Gist options
  • Save StevenJL/2f23f583087db16789b3 to your computer and use it in GitHub Desktop.
Save StevenJL/2f23f583087db16789b3 to your computer and use it in GitHub Desktop.
import { createStore } from 'redux'
import todoApp form './reducers'
// we create the store the store by invoking `createStore` with
// the root reducer.
const store = createStore(todoApp)
// `createStore` also takes a second option argument that is the initial state of the store.
const initialState = {
visibilityFilter: "SHOW ALL",
todos: []
}
const store = createStore(todoApp, initialState)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment