DEV Community

Johan Rönnblom
Johan Rönnblom

Posted on

I built a web "framework" that makes FE code 30-60% less complex - Snapse is also faster than React & Vue

In spring 2025, I asked myself: why isn't it possible to have a web framework that is radically simpler? I started by writing some pseudocode, then set out to find out why I couldn't make it real.

I failed.

It works. It's fast. And it really makes FE code much simpler.

Snapse benchmark comparison

Now, Snapse is not really a framework — it's a tiny standard JavaScript library. No compiler needed. It also fully supports TypeScript.

It's based on a form of signals, but with some twists. Along with the familiar compute() notation, Snapse creates derived states by calling chain functions on existing states — myArray.filter(filterFn).toSorted(sortFn).map(v => li(v)) creates a reactive array of <li> elements that update when the values in myArray change, when something is added, removed, and/or moved in the array - or when any states used by filterFn or sortFn are changed.

Another way is to call a function that is a state:
const value = await api.getValue(arg) creates a reactive value if the getValue function is a state. And if arg is a state, value will be updated — calling the API again — when arg changes.

Updates are lazy, glitch-free and batched. What that means is that nothing will be recalculated or re-rendered unless it is actually used, and at least one dependency changed - and then only once, even in complex cases.

I've now run out of ideas for why Snapse doesn't work, so I need your help to tell me what is wrong with it.

Top comments (0)