Comment

Comment by danielvaughn

So I just started a new side project, and I'm using JS without a framework for the first time in over 5 years.

I poured over several state management libraries before just deciding to write a naive solution on my own. I've got a very simple stateful class - the data model itself is private, and it has a custom getter/setter for access. The setter broadcasts a custom event for each top-level key that changed.

Super simple, easy to understand, and the limitation forces me to keep my state as shallow as possible.

Am I missing something? I expected to run into trouble but so far it's been easy breezy.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton