react-redux-dispatch-async::guitar:react-redux hook和redux中间件可以等待带有固定定义后缀的异步操作

时间:2024-05-22 03:36:55
【文件属性】:

文件名称:react-redux-dispatch-async::guitar:react-redux hook和redux中间件可以等待带有固定定义后缀的异步操作

文件大小:128KB

文件格式:ZIP

更新时间:2024-05-22 03:36:55

react redux async async-actions react-hooks

react-redux-dispatch-async :backhand_index_pointing_right: REDUX中间件和HOOK :party_popper: 等待带有SUFFIXES的异步操作 :backhand_index_pointing_left: import { useDispatchAsync } from 'react-redux-dispatch-async' export default function MyUserInterface ( { id } : { id : string } ) { // :backhand_index_pointing_right: pass action and arguments into the array const response = useDispatchAsync ( getUserActionRequest , [ id ] ) switch ( response . status ) { case 'loading' : return < AppLoader


【文件预览】:
react-redux-dispatch-async-master
----.gitignore(93B)
----package.json(1KB)
----src()
--------DispatchAsyncMiddleware.ts(1KB)
--------useDispatchAsync.ts(4KB)
--------index.ts(109B)
--------ActionListener.ts(432B)
--------useDispatchAsync.test.tsx(4KB)
--------dispatchAsync.ts(2KB)
----tsconfig.json(973B)
----.github()
--------FUNDING.yml(645B)
----README.md(5KB)
----.npmignore(72B)
----yarn.lock(317KB)

网友评论