Hacker News new | ask | show | jobs
by BeefWellington 1080 days ago
That's a very oversimplified view of handlers.

An alternate view might be:

Handlers are functions that are part of the app object's state, which alters the app's behavior.

In the majority (possibly overwhelming majority) of the cases this is true. The purpose of Handlers and similar Publisher/Subscriber patterns is effectively to change application behavior when they are configured.

1 comments

> Handlers are functions that are part of the app object's state, which alters the app's behavior.

I find that phrasing very fair.