SimpleSharedState React Hook
Redux is verbose. SimpleSharedState is brief.
- Docs: https://simplesharedstate.com
- Repo: https://github.com/rm-rf-etc/simple-shared-state
- Example app: https://simple-shared-state.stackblitz.io/
- Edit online: https://stackblitz.com/edit/simple-shared-state
Get It
npm install use-simple-shared-state
Basic Use
Assuming you already have a store made with simple-shared-state
:
;;; const selectors = statecounter1 stateexamplesuser // put as many selectors here as you need; const MyComponent = { const count1 someObject = ; return <div> <h1>Hello World</h1> <span>count1</span> <pre>JSON</pre> </div> };
That's all there is to it.