Settings

Theme

Show HN: S² is a function for reactive web UI

gr0uch.github.io

6 points by daliwali 5 years ago · 2 comments

Reader

quickthrower2 5 years ago

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?

  • daliwaliOP 5 years ago

    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...

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection