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.
@_developit I love this but I'm also worried that this will encourage developers to just write mutation-like code everywhere 😰 Makes things easy, not simple.
@_developit Congrats on shipping Signals, Jason! Really like the DX. Reminds me of some of the goodness in Solid + MobX.
@_developit @t3dotgg My immediate thought: is Preact becoming… react AND @solid_js at the same time??
@_developit What was the initial inspiration? SolidJS?
@_developit No one seems to be saying the C-word. So I'm going to. Does that mean that Preact uses a compiler now? So it's like Svelte :)
@_developit Nice! It reminds me of Jotai for React, but it's one step less as you can directly use the value.
@_developit Outstanding work 👏 I can't wait to migrate my hundreds-of-lines hooks monster and benchmark the results.
@_developit This is awesome and incredibly compelling 🙌🙌🙌🙌
@_developit Is this purely for primitives, or can you set .value to an object? If it is possible use an object, does it have to be immutable?
@_developit Is there support for React Native out of the box? If not, is it on the roadmap?
@_developit wowowowow your router can now also live outside preact — mega cool
@_developit Congrats! 🎉 First impressions: - Awesome! - There's no "untrack", that seems essential. - There's no "root" nor "For", without those mapping over signals contains arrays efficiently seems impossible. - I'm surprised to see ".value", which breaks type checking in edge cases.
@_developit > Remember that there is no rush to switch to signals. FOMO constantly tapping on my shoulder 👀
@_developit This looks awesome, congrats! So glad that @preactjs charts its own path where it makes sense!