pburtchaell/redux-promise-middleware
Fork: 188 Star: 1982 (更新于 2024-10-18 15:40:38)
license: MIT
Language: JavaScript .
Enables simple, yet robust handling of async action creators in Redux
最后发布版本: 6.2.0 ( 2023-12-28 03:07:18)
Redux Promise Middleware
Redux Promise Middleware enables simple, yet robust handling of async action creators in Redux.
const asyncAction = () => ({
type: 'PROMISE',
payload: new Promise(...),
})
Given a single action with an async payload, the middleware transforms the action to a separate pending action and a separate fulfilled/rejected action, representing the states of the async action.
The middleware can be combined with Redux Thunk to chain action creators.
const secondAction = (data) => ({
type: 'SECOND',
payload: {...},
})
const firstAction = () => {
return (dispatch) => {
const response = dispatch({
type: 'FIRST',
payload: new Promise(...),
})
response.then((data) => {
dispatch(secondAction(data))
})
}
}
Documentation and Help
Heads Up: Version 6 includes some breaking changes. Check the upgrading guide for help.
Issues
For bug reports and feature requests, file an issue on GitHub.
For help, ask a question on StackOverflow.
Releases
For older versions:
Maintainers
Please reach out to us if you have any questions or comments.
Patrick Burtchaell (pburtchaell):
Thomas Hudspith-Tatham (tomatau):
License
最近版本更新:(数据更新于 2024-10-04 00:10:17)
2023-12-28 03:07:18 6.2.0
2022-09-26 10:04:07 6.1.3
2019-11-06 01:08:18 6.1.2
2019-06-16 01:03:18 6.1.1
2019-02-14 09:43:59 6.1.0
2019-02-08 07:40:47 6.0.1
2019-02-04 04:04:10 6.0.0
2018-04-19 07:12:12 5.1.1
2018-04-18 21:44:48 5.1.0
2017-11-20 00:26:05 5.0.0
主题(topics):
async, async-functions, optimistic-updates, promises, redux
pburtchaell/redux-promise-middleware同语言 JavaScript最近更新仓库
2024-11-05 19:13:47 jerryc127/hexo-theme-butterfly
2024-11-05 13:53:42 LiteLoaderQQNT/LiteLoaderQQNT
2024-11-03 02:40:36 chris81605/Degrees-of-Lewdity_Cheat_Extended
2024-11-01 21:55:46 projectdiscovery/nuclei-templates
2024-11-01 19:24:44 NumberSir/DoL-I18n-Build
2024-11-01 12:25:14 midoks/mdserver-web