Recipes
With the very straightforward and unopinionated approach of SimpleR State in managing app state, you have full flexibility to implement things the way you want. It works seamlessly with whatever code architecture you choose for your React app.
Here we provide some suggested patterns that you may consider for specific scenarios.
- Binding only relevant values (partial or computed)
- Async actions
- Prefetching data using async initial value
- Persisting entity values
- Separating "pure" updates from actions
- Orchestrating updates to multiple entities with one action
- Simplifying nested object updates with proxies
- Unit testing entities
- Resetting all entities between component tests
- Extending functionality with plug-ins