ez-react-redux
User Guide
No...no...no🙅♂️🙅♀️, ez-react-redux
is a bad pattern👎👎👎!
You shouldn't use it in any productions.
But it's a life saver in small projects.
- No reducers(out of the box)
- Immediately update your state any time any where without the hindrance of reducers
- Get rid of immutable,
immer
is internally embeded useSelector
supported- No React Context
And it also has the following features:
- Support multiple store instances
- Support
redux
ecosystem(likeredux-logger
) - Support
Typescript
- Very small size
EZ at a Glance
// Follow a property; // Update a propertystore.dispatch;
Working example
; ; ; ;
API Reference
;/** * Updater is a function that describes how to update state. * @template S The type of the whole state */declare ;/** * EZAction is the only action type for `ez-react-redux` * @template S The type of the whole state *//** * Create the store instance * @template S The type of the whole state */declare ;/** * Property selector * @template S The type of the whole state */declare ;/** * Property selector for React hooks * @template S The type of the whole state * @template T The type of the selected property */declare ;