Comment

Comment by 0xpgm

How I've done it is to use some kind of observer pattern, where you register listeners to state changes.

Whenever state is updated, the listeners are all called with the updated state and can update the UI and what not based on the new state.

I haven't profiled this and compared it to frameworks, but feels adequate for the relatively simple UIs I've done.

parent 0xpgm 10 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton