Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: S² is a function for reactive web UI (gr0uch.github.io)
6 points by daliwali on May 19, 2021 | hide | past | favorite | 2 comments


This feels a lot like KnockoutJS's observables (but using proxies I guess so the code looks neater). Is it much different to that. Am I missing something?


I've never actually used Knockout but I guess it looks vaguely similar.

s2 has the advantage of being much smaller (a little over 2kb compressed), and faster on benchmarks[0] and probably real world performance. The API tries to get out of your way as much as possible. The dependency tracking is seamless by using Proxy.get trap. There's no forced separation of models or views, it's all data.

I wrote it because I had to make a complex UI with streaming WebSocket data work smoothly.

[0] https://krausest.github.io/js-framework-benchmark/current.ht...




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

Search: