Comment

Comment by BeefWellington

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.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton