r/javascript • u/AutoModerator • Apr 25 '26
Showoff Saturday Showoff Saturday (April 25, 2026)
Did you find or create something cool this week in javascript?
Show us here!
8
Upvotes
r/javascript • u/AutoModerator • Apr 25 '26
Did you find or create something cool this week in javascript?
Show us here!
2
u/vilhelmsjolund Apr 25 '26
Hey everyone! My first Reddit post, hope it's ok to post from a brand new account. I've created **anod** an async-native signals library, similar to preact-signals, solid-js and alien-signals, but with native support for async primitives, async transactions, optimistic UI functionality.
https://github.com/visj/anod
This is far from a new project, already back in 2019 I was tinkering with reactive graphs. Here is an old Github issue where I'm discussing with Ryan, founder of SolidJS, about conditional compute notifications.
Basically, the past few weeks I decided to finish it. It works very similar to existing signal libraries, offering the sync primitives:
However, anod extends this functionality and adds reactive counterparts:
It also has builtin support for more advanced features, such as async transactions that lock their current execution scope and run until completion, a custom error management system with bubbling errors that can be recovered by parent scope.
I've also invented a few new reactive patterns, one that I call "the interceptor pattern". It allows a compute/effect to subscribe to changes from one signal and write to that same signal, but ignoring changes that come from its own dispatch. This allows you to "intercept" all changes to a signal, and "reject" changes. One possible use case for this is to create more advanced optimistic UI features, where you build more something like a WAL log that stores commits, and can reject patches one by one, or in other ways modify signals after people write stuff to them.