Store
Store is observable object that holds all application state
public todos: [];
componentDidMount() {
this.subscription = Store.store.select(['todos'])
.subscribe(state => {
this.todos = state; // OR this.todos = state.toJS()
this.forceUpdate();
})
}
componentWillUnmount() {
this.subscription.unsubscribe();
}
render() {
return (
<div>{this.todos.getIn([0])}</div>
)
}Last updated