@anew/hooks
AnewJS hooks for react application
Updates
For updates checkout Change Log.
Installation
To install @anew/hooks
directly into your project run:
npm i @anew/hooks -S
for yarn users, run:
yarn add @anew/hooks
Usage
// Example Storeconst CounterStore = // Create Hook to use counter stateconst useCounterState = // Usageconst Counter = { const count = // ⚠️ NOTE: Use shallowEqal when returning an object // Otherwise the a re-render will be triggered on any // state change since the a new object is instanitated every time const count = useStoreState return <div>count<div>}