@redoute/accessor
v0.0.4
Published
Elegant react hook for access redux state
Downloads
3
Keywords
Readme
name: Accessor menu: Dev route: /accessor
Accessor
This package is a elegant way to create redux selector and action at the same time and return a hook to facilitate the component connection.
Usage
import accessorFactory from '@redoute/accessor'
accessorFactory()
take two arguments:
[selectors]
an array of redux selector[actions]
an array of redux actions
That's returning a shiny react hook. This hook take only one argument: props
selectors and actions are memoized with a basic useCallback
which has props as dependencies