Skip to content

Instantly share code, notes, and snippets.

@btg5679
Last active July 14, 2017 01:59
Show Gist options
  • Save btg5679/effda296c837b42db63cb36835eeea17 to your computer and use it in GitHub Desktop.
Save btg5679/effda296c837b42db63cb36835eeea17 to your computer and use it in GitHub Desktop.
Redux Example Store
import { createStore } from 'redux';
const store = createStore(r, {
user: {
name: 'wacko',
age: 48
},
commentCount: 2,
loginHistory: {
loginDate: '2017-01-01',
result: 'success'
},
...
});
//Called any time an action is dispatched
store.subscribe(());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment