You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way this is formulated is just plain wrong and misleading. I'm guessing the author meant that in the one case the callback (hook) is awaited and in the other case it's directly executed. When you remove the "async" keyword, you don't end up with "synchronous code". In fact in this specific case it's the exact opposite - using "async" makes your code synchronous because Payload awaits the implicit promise that gets created around an "async" function.
The text was updated successfully, but these errors were encountered:
Documentation Issue
The way this is formulated is just plain wrong and misleading. I'm guessing the author meant that in the one case the callback (hook) is awaited and in the other case it's directly executed. When you remove the "async" keyword, you don't end up with "synchronous code". In fact in this specific case it's the exact opposite - using "async" makes your code synchronous because Payload awaits the implicit promise that gets created around an "async" function.
The text was updated successfully, but these errors were encountered: