> For the complete documentation index, see [llms.txt](https://reimjs.gitbook.io/reim/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://reimjs.gitbook.io/reim/guide/store.md).

# Store

## What is store?

The **Store** is holds the state, and is responsible for change of state. You can also subscribe to a store for changes.

## Creating a store

{% code title="stores/todo.js" %}

```javascript
import reim from 'reim'

const todoStore = reim({
    todos: []
})

export default todoStore
```

{% endcode %}

### Creating a named store

A store is anonymous by default. You can create a named store for use with plugins e.g. **reim-reporter.**

```javascript
const todoStore = reim({
    todos: []
}, {
    name: 'Todo-Store'
})
```

### Adding plugins

You can easily apply plugins on store

```javascript
import react from 'react-reim'

const store = reim({message: ''}, {
    plugins: [react()]
})
```

or after it is initialized

```javascript
const store = reim({}).plugin(persist())
```
