@triggery/jotai
Read a Jotai atom from a Triggery condition. Pull-only: store.get(atom) runs only when a trigger fires, the host component is never subscribed to atom updates.
Install
Section titled “Install”pnpm add @triggery/core @triggery/react @triggery/jotai jotai npm install @triggery/core @triggery/react @triggery/jotai jotai yarn add @triggery/core @triggery/react @triggery/jotai jotai bun add @triggery/core @triggery/react @triggery/jotai jotai Peer deps: react >= 18.0.0, jotai ^2.
What’s inside
Section titled “What’s inside”| Export | Purpose |
|---|---|
useJotaiCondition(trigger, name, store, atom, selector?) | Register an atom-backed condition. Supports an optional projection selector. |
Quick example
Section titled “Quick example”With a projection selector:
How it works
Section titled “How it works”Pull-only: store.get(atom) runs only when a trigger fires, not on every atom update. The host component is never re-rendered by atom changes — that’s useAtomValue’s job and lives in the components that actually render the value.
Related packages
Section titled “Related packages” @triggery/core Exposes Trigger.
@triggery/react useJotaiCondition is a React hook.
@triggery/zustand Alternative adapter for Zustand stores.
@triggery/redux Alternative adapter for Redux stores.
@triggery/reatom Reatom atom adapter — similar pull-only model.
@triggery/signals Adapter for @preact/signals-core and alien-signals.