Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to wait for promise object ? #6

Open
krsandesh opened this issue Feb 5, 2020 · 0 comments
Open

How to wait for promise object ? #6

krsandesh opened this issue Feb 5, 2020 · 0 comments

Comments

@krsandesh
Copy link

Hi,

Your way of implementing a generic api middleware is great.

I am using 'UseDispatch' from react-redux library, here i will dispatch to an action and do an api call and update the redux store using reducer.

But my requirement is "need to wait till the redux store has data and then proceed further". Any idea how to get this ?

Can i make a specific api call from action method as async await when i call that action method from functional component or inside useEffect() i need to wait till i have data in redux store.

Regards,
Sandesh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant