Hooks
Last updated
Last updated
Difficulty: Hard
Event-driven understanding required
Hooks should be used carefully as they can introduce undefined behavior and even slow down the app.
Some hooks, like onGetAnime
, are triggered very often, so it's a good habit to start by logging the event in order to figure out its frequency. You should also avoid expensive calculations or fetch calls in hook handlers unless you can guarantee that the hook is not triggered often.