mobx-state-tree is a state container that combines the simplicity and ease of mutable data with the traceability of immutable data and the reactiveness and performance of observable data.
feature/
state/
- index.js
- component.jsx
state/index.js
import { types } from "mobx-state-tree"
const initState = () => ({...})
export default types.model(initState())
.views(self => ...)
.actions(self => ...)
component.jsx
import { observer } from 'mobx-react'
export default observer(() => ...)
Pros:
- best of both worlds (mutable & immutable)
- opinionated
Cons:
- learning curve
Unsolved problems
How???