
Enter a search term above to see results...
Enter a search term above to see results...
@semantic-ui/reactivity
is a standalone implementation of a signals based reactivity system. It is used internally to power templating and rendering components, but can also be used as reactivity primitives for any custom project.
Reactivity can be used as a standalone package or alongside Semantic UI components.
npm install @semantic-ui/reactivity
import { Signal, Reaction } from '@semantic-ui/reactivity';
const counter = new Signal(0);
Reaction.create(() => { console.log('Counter value:', counter.get());});
counter.set(1); // Console: "Counter value: 1"
Semantic UI includes various helpers to make it easy to manipulate data like arrays, records (arrays of objects), counters, toggles, and streamline data manipulation.
toggle()
for toggling between false
and true
Collection Helpers (Array of Objects)
now()
for setting to current timeThese helpers provide convenient ways to manipulate reactive data structures and streamline common operations in your reactive computations.