Releases: sidecus/roth.js
Releases · sidecus/roth.js
Enable memoization for useBoundActions.
Bound actions are called usually from within useEffect or event handlers. Without memoization, when using within useEffect it can trigger unwanted re-rendering if it's added into the dependency list.
To really benefit from memoization, the parameters (named action creators map) should be defined at global scope instead of function scope.
This is documented in the type definitions and readme.
switch to bindActionCreators and improve typing
- switch to bindActionCreators for useBoundActions to further reduce package size and remove custom code.
- improve ActionReducerMap typing for createSlicedReducer