Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I use something similar to React class components. Under the hood my set function calls Object.assign and I debounce the render function callback. You could implement it yourself in <80 lines of JavaScript[0]. I'm not sure what other people use but I've been using this style of state management for ~4 years and it's been fine so far.

[0]: https://github.com/codewithkyle/supercomponent/blob/master/s...

Edit: if signals are your jam you could us https://github.com/maverick-js/signals



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: