Remix.run Logo
patates 3 hours ago

It's like dealing with event handler registrations. You cannot compose those too, as they are "hooks" for when a specific event occurs.

Hook definitions can be a composition of reusable functions and other hooks, like any event handlers (e => filterKeys('cmd+s, ctrl+s', preventDefault(e)).then(save)). It's possible to break this anology (you can register an event handler in an if branch) but I hope it gets the point across.