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
Furthermore, if generic hooks are registered before and after route handlers are registered, then only the first routes will be affected by the global hooks.
Is this a design decision or a bug? It creates a complicated scenario, where the declarations need to be carefully called in the right order, and where you are limited by the initial declaration of the hooks. I can imagine many use cases where the library consumer would want to override the generic hooks.
The text was updated successfully, but these errors were encountered:
The following snippet will correctly print
before hook
followed byroute handler
:However, the following will just print
route handler
:Furthermore, if generic hooks are registered before and after route handlers are registered, then only the first routes will be affected by the global hooks.
Is this a design decision or a bug? It creates a complicated scenario, where the declarations need to be carefully called in the right order, and where you are limited by the initial declaration of the hooks. I can imagine many use cases where the library consumer would want to override the generic hooks.
The text was updated successfully, but these errors were encountered: