Hooks | Fastify
fastify.dev · 5,075 words · saved by 1 readers
Hooks
Version: latest (v5.10.x) On this page Hooks Hooks are registered with the fastify.addHook method and allow you to listen to specific events in the application or request/response lifecycle. You have to register a hook before the event is triggered, otherwise, the event is lost. By using hooks you can interact directly with the lifecycle of Fastify. There are Request/Reply hooks and application hooks: Request/Reply Hooks onRequest preParsing preValidation preHandler preSerialization onError onSend onResponse onTimeout onRequestAbort Manage Errors from a hook Respond to a request from a hook
related reading
- The hitchhiker's guide to plugins | Fastifyfastify.dev
- GitHub - fastify/fastify-cookie: A Fastify plugin to add cookies support · GitHubgithub.com
- Hooks | Cursor Docscursor.com
- You Might Not Need an Effect – Reactreact.dev
- Fast and low overhead web framework, for Node.js | Fastifyfastify.dev
- SWR: React Hooks for Data Fetching - Vercelswr.vercel.app
- Introducing Hooks – Reactlegacy.reactjs.org
- Microtasks and event looptr.javascript.info
- ALL React Hooks Explained in 12 Minutesyoutube.com
- Getting Started: Error Handling | Next.jsnextjs.org
- Reusing Logic with Custom Hooks – Reactreact.dev
- Documentation | NestJS - A progressive Node.js frameworkdocs.nestjs.com