Created
February 8, 2017 08:34
-
-
Save liezl200/4a2d3f9171d65780c34c23e1a9a7aebb 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
const reducer = (state=[], action) => { | |
if (action.type === 'splitstr') { | |
return action.payload.split(''); | |
} | |
return state; | |
} | |
const store = Redux.createStore(reducer); | |
store.getState(); | |
const action = {type: 'splitstr', payload: 'asdf'}; | |
store.dispatch(action); | |
store.getState(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment