docs: clarify async and callback plugin styles#297
Conversation
Fdawgs
left a comment
There was a problem hiding this comment.
Already covered by Fastify's docs: https://fastify.dev/docs/latest/Reference/Hooks/?_highlight=mix#respond-to-a-request-from-a-hook
Thanks for the review. I understand that this behavior is already covered in the Fastify documentation. Would it be useful to replace this section with a short cross-reference to the existing Fastify docs, or would you prefer me to close this PR? |
|
Not needed at all, as the The mentioned issue pre-dates the error code mentioned. Thanks though. |
Summary
Clarifies that plugin functions should not mix callback and async styles.
This adds a short documentation note explaining that async plugin functions should not use the
donecallback, and shows separate examples for callback-style and async-style plugins.Related issue
Refs: #221