rofrischmann/alveron

View on GitHub
website/docs/concepts/model.mdx

Summary

Maintainability
Test Coverage
# Model

The model describes the **initial state** of a store.
It can be composed of any shape.

If no model is provided, the initial state will be set to `undefined`.

```
type Model = any
```

## Example

```js
// primitives
const model = 0
const model = 'Some text'

// arrays
const model = ['First Todo', 'Second Todo', 'Third Todo']

// objects
const model = {
  loading: false,
  error: null,
  data: null,
}
```