Comment

Comment by qudat

I think `view = fn(state)` is mostly right but how it is implemented is wrong. If we look at react, everything is nice and declarative until you register event handlers, at which point you enter imperative land to hand manipulate state.

I think what is more accurate is: `view = fn(event-stream)`. Events include but not limited to:

- User events

- Prop change events

- Local state change events

- Global state change events

When we switch the paradigm to be about event streams, all of a sudden there is no bifurcation between prop, local state, global state, and user events -- it is all treated the exact same.

parent qudat 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton