@ibrilliant/hooks
v2.0.0
Published
## install
Downloads
6
Readme
hooks
install
$ yarn add @ibrilliant/hooks
| hooks | 简介 |
| --------------------------------------------------------------------------------- | ------------------------------------------ |
| createProviderAndHooks | 对provider
进行的包装 |
| createSliceHook | 简化获取slice
state
的方式 |
| DispatcherProvider | 简化派发action
调用 |
| makeSlice | 使用slice
来封装useReducer
|
| useMuiAnchorElControl | 管理material-ui
的AnchorEl
|
| useMuiInputControl | 管理material-ui
input
value
|
| useMuiTabsControl | 管理material-ui
tabs
value
|
| useBehaviorSubjectControl | 管理rxjs
BehaviorSubject
|
| useSubject | 管理rxjs
subject
|
| useSubscribe | 自动订阅、取消 rxjs
observable
|
| useActionPending | 管理loading
,避免出现较短时间的闪烁 |
| useConstant | reexport from use-constant |
| useLocationQuery | parse location.search
|
| useNumberInput | 数字输入框处理逻辑 |
| useSelectorWithIsEqual | 增强useSelector
|