Last active
July 14, 2017 02:00
-
-
Save btg5679/6dcf095cc1e355cd895b5bd433ab49b1 to your computer and use it in GitHub Desktop.
This file contains 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 { createStore } from 'redux'; | |
const store = createStore(r, { | |
user: { | |
name: 'wacko', | |
age: 48 | |
}, | |
commentCount: 2, | |
loginHistory: { | |
loginDate: '2017-01-01', | |
result: 'success' | |
}, | |
... | |
}); | |
//Action dispatched to your Store | |
store.dispatch({ type: 'CMT', payload: 1 }); | |
//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