Thursday, December 28, 2023

SolidJS vs React; useSignal() vs useState()

Solid.js is very similar to React, but fundamentally different: 
no shadow dom, less state complexity

Getting Started with SolidJS - YouTube by Academind / Max S.
SolidJS made "Signals" one of the most important frontend JS framework trends you can find right now! 

solidjs.com
Simple and performant reactivity for building user interfaces.


solidjs/solid: A declarative, efficient, and flexible JavaScript library for building user interfaces. @GitHub


Websites using SolidJS - Wappalyzer
OpenAI is using SolidJS


useSignal?

Solid.js and many other tools implement a new way for managing "app state"


The key difference between Signals and State is that Signals return a getter and a setter, 
whereas non-reactive systems return a value (and a setter).

Why is returning a getter (function) better than returning a value?
Because by returning the getter, you can separate the passing of the state-reference from a reading of the state-value.




Why are people SO obsessed with useSignal()? - YouTube
SolidJS, Qwik.js, Preact.js, Angular


by Misko Hevery CTO at Builder.io, Creator of Angular & Qwik





even latest Angular supports useSignal!






No comments: