Introducing Preact Signals: a reactive state primitive that is fast by default. ✅ feels like using plain values 🥳 automatic updates when values change ⏱ updates DOM directly (fast!) 🥹 no dependencies arrays preactjs.com/blog/introduci…
What makes Signals unique is that state changes automatically update components and UI in the most efficient way possible. You don't have to write any code to opt into this - simply accessing a signal's value in a component will set everything up for you.
Signals are deeply integrated into Preact to provide the best possible performance and ergonomics. Since everything is automatic, you can learn Signals without worrying about the most common state management footguns.
@_developit Hello Jason that’s amazing thank you! Does it work deeply with object, arrays, objects with arrays…!?
@_developit Jotai does this too. jotai.org Small but beautiful
@_developit Is there a way to make this work globally or do you have to pass it down through multiple files to children?
@_developit So you get the benefits of Svelte or Solid but without giving up VDOM and the simplicity of a "it's just a JS library"?
@_developit How do I write complex signals? E.g. a + b? I.e. how do I set the value explicitly. Do we need to explicitly cache object values if we combine signals into complex objects like we do with reselect?