You can declare an async function in the value prop to the Provider. Here's an example: codesandbox
P.S. Not sure if this exactly what you asked for.
Yes, this is it. It occurred to me when I saw the example that I don't need middleware to access state - here I can simply refer to it if I need for example some intersection between fetched data and current state.
Thank you :-)
You're welcome👍🏽
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You can declare an async function in the value prop to the Provider. Here's an example: codesandbox
P.S. Not sure if this exactly what you asked for.
Yes, this is it. It occurred to me when I saw the example that I don't need middleware to access state - here I can simply refer to it if I need for example some intersection between fetched data and current state.
Thank you :-)
You're welcome👍🏽