> For the complete documentation index, see [llms.txt](https://vytautaspranskunas.gitbook.io/react-state-rxjs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vytautaspranskunas.gitbook.io/react-state-rxjs/core-concepts/store.md).

# Store

Store is observable object that holds all application state

Store can be accessed in one of 2 ways:

* From [Actions](/react-state-rxjs/core-concepts/actions.md)
* Or directly Store.store - but in this case you are responsible for subscription management and view update

```typescript
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>
        )
}
```

***TIP**: try to avoid .toJS() calls because it is not the best practice and is might be costly performance vise.*
