Created
November 2, 2017 20:48
-
-
Save matthieu-D/e59fa1ab63d2ab106cdf60cb5281b455 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
componentWillLoad() { | |
this.getStoreService(); | |
const preloadedState = [ {id:1, value:'Hello'} ]; | |
this.store = createStore<any>(this.todoReducer, preloadedState); | |
this.todos = this.store.getState(); | |
this.store.subscribe(() =>{ | |
this.todos = this.store.getState(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment