Do you know if there is a way to extend this so that it could be executed on demand? What I'm after is a basic save functionality.
What I have been doing so far is just having a callback which calls an async function. The callback is then called from the save buttons onClick handler. This of course doesn't support cleaning up so if the component gets unmounted before saving request has finished it might call setState on an unmounted component
Looks really nice!
Do you know if there is a way to extend this so that it could be executed on demand? What I'm after is a basic save functionality.
What I have been doing so far is just having a callback which calls an async function. The callback is then called from the save buttons onClick handler. This of course doesn't support cleaning up so if the component gets unmounted before saving request has finished it might call setState on an unmounted component
I thought about creating useAsyncCallback. Shouldn‘t be to hard to implement!