This is the reactivity part of SolidJS, extracted out of the UI framework. Check out SolidJS's Reactivity Tutorial to learn how to use this.
This extraction has made changes:
- Anything related to Solid's UI framework has been removed.
- All
createX
functions, such ascreateSignal
, have been renamed to$x
, e.g.$signal
. $DEVCOMP
,$PROXY
, and$TRACK
have been renamed with their$
replaced with_
, e.g._DEVCOMP
.- The default
equalFn
has been changed froma === b
to(a === 0 && b === 0) || Object.is(a, b)
, so nowNaN
will compare as equal to itself. - Dev exports are always accessible.
- Instead of returning a tuple,
$signal
returns an object withget
andset
methods. - Added
readonly
function to make object signals read-only.