React & React Native

Jotai & atomic state

Në shqip: Jotai

ShpjegimiSQ

Jotai-ja e ndan state-in në „atome“ të vogla të pavarura, që secili komponent i lexon dhe i ndryshon si useState — por të përbashkëta në gjithë aplikacionin.

EnglishEN

Jotai splits state into small independent “atoms” that each component reads and changes like useState — but shared across the whole app.

Si ta mendosh

Si copat e Lego-s: secila e vogël, por i bashkon si të duash.

Lexoje në anglisht

Like Lego pieces: each small, combined however you like.

Shembull kodijavascript

const temaAtom = atom("light");
const [tema, setTema] = useAtom(temaAtom);

Terma të lidhur