zustand-opine

0.0.8 • Public • Published

Zustand Opine

Not ready for use yet. API still very much in flux

Goals for 1.0.0

  • [ ] Structured store, with each slice being split up into initialState, actions, derived, etc.
  • [ ] Redux Devtools support with automatic action names
  • [ ] Derived state, with optional dependency / query hadnling so complex state doesn't get computed every update
  • [ ] Fully typed, such that autocomplete it available on all state, actions, etc.
  • [ ] Use Immer to simplify nested mutations
  • [ ] Fully tested with several example use-cases
  • [ ] Testing, linting, formatting enforced by CI

Opine Definition

transitive verb

To state as an opinion

Purpose

An opinionated Zustand store.

  • Automates naming of actions for Redux Dev Tools
  • Includes Immer for simpler state management
  • Reduces boilerplate when writing a namespaced multi-slice store

Demo

https://codesandbox.io/s/zustand-namedslices-5qkke?file=/src/App.js

Readme

Keywords

none

Package Sidebar

Install

npm i zustand-opine

Weekly Downloads

15

Version

0.0.8

License

MIT

Unpacked Size

5.29 kB

Total Files

6

Last publish

Collaborators

  • danielpowernl