Calling async actions from other async actions
See original GitHub issueHey, as in the subject. Is it possible to call async action from within other async action?
In Redux + Redux Thunk, it’s possible to do something like:
export const asyncAction = (args: Args): ThunkResult<void> => async (
dispatch,
getState
) => {
try {
await dispatch(anotherAsyncAction());
} catch (error) {
/* ... */
}
};
But it doesn’t seem to be possible in ReactTracked. Is it?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Redux Fundamentals, Part 6: Async Logic and Data Fetching
Just like with a normal action, we first need to handle a user event in the application, such as a click on a...
Read more >How can I make a function Async in reactjs which calls ...
I am using react, with redux for state management. In my UI I have a button which when clicked it calls a function...
Read more >Async actions
Async actions · Fetching data for display alone isn't sufficient for most applications. · Like promiseFn , a deferFn is a function that...
Read more >async function - JavaScript - MDN Web Docs - Mozilla
An async function will return a different reference, whereas Promise.resolve returns the same reference if the given value is a promise. It can ......
Read more >How to handle Async operations with Redux - Imaginary Cloud
So, where should you apply async calls in Redux? The Actions should be the immediate answer, but the basic implementation of actions is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dai-shi hey, sorry had to postpone moving to react-tracked as other things are more important but yeah I will use your approach. Actually I wanted to avoid that but it will just be a little bit more rewrite but code will still be clean and readable. Thanks! 😃 Will close this issue
Still having any issues?