@triggery/redux
Read a Redux store from a Triggery condition without subscribing the component to re-renders. Works with vanilla Redux and @reduxjs/toolkit — the hook only calls store.getState() at fire time.
Install
Section titled “Install”pnpm add @triggery/core @triggery/react @triggery/redux redux npm install @triggery/core @triggery/react @triggery/redux redux yarn add @triggery/core @triggery/react @triggery/redux redux bun add @triggery/core @triggery/react @triggery/redux redux Peer deps: react >= 18.0.0, redux ^4 || ^5. @reduxjs/toolkit re-exports the same Store shape and works out of the box.
What’s inside
Section titled “What’s inside”| Export | Purpose |
|---|---|
useReduxCondition(trigger, name, store, selector) | Register a Redux-backed condition. The component is not subscribed to the store. |
Quick example
Section titled “Quick example”How it works
Section titled “How it works”Triggery is pull-only: the selector runs only when a trigger fires, not on every dispatch. The hook does not subscribe the component to the store — dispatches never re-render the bridge component. If a separate component needs the same slice in its JSX, use useSelector from react-redux alongside.
Related packages
Section titled “Related packages” @triggery/core Exposes Trigger.
@triggery/react useReduxCondition is a React hook.
@triggery/zustand Alternative adapter for Zustand stores.
@triggery/jotai Alternative adapter for Jotai atoms.
@triggery/codemod migrate-from-listener-middleware moves RTK effects into triggers.