calling mutations in setInterval or setTimeout
Is it me or do mutations not like being called inside other async functions (like intervals or time outs)?
2 Replies
If these are still running once the action has finished that's an outstanding mutation call
If you need setInternal or setTimeout you'll still need to ensure that async call is awaited somehow, say by awaiting a promise at the end of the action that isn't resolved until these mutations have finished
The big idea is that all the work of an action should be done before it finishes; you can use
async/await
to make that happen (recommended) or you can do it the old way with callbacksI see, that makes sense
thanks