I've searched in the docs but didn't found this information. So, hooks are synchronous or asynchronous?
@gajomon hooks are synchronous
Alright, but where is this information from?
you cant define a hook as async because they are not supposed to return a promise. If you do it will result in race conditions. So instead write async function inside the hook and then call it.
Alright, I've tried it and you're right, hooks doesn't returned a promise. Thanks
Most helpful comment
you cant define a hook as
asyncbecause they are not supposed to return a promise. If you do it will result in race conditions. So instead write async function inside the hook and then call it.