@triggery/solid
SolidJS bindings for Triggery. Same hook shape as @triggery/react and @triggery/vue, native to Solid’s signals and onCleanup lifecycle. Zero runtime dependencies — a thin lifecycle layer over @triggery/core.
Install
Section titled “Install”pnpm add @triggery/core @triggery/solid solid-js npm install @triggery/core @triggery/solid solid-js yarn add @triggery/core @triggery/solid solid-js bun add @triggery/core @triggery/solid solid-js Peer deps: solid-js >= 1.8.0.
What’s inside
Section titled “What’s inside”| Export | Purpose |
|---|---|
useEvent | Typed event emitter, stable identity across the component lifetime. |
useCondition | Register a pull-only condition getter. Reads signals naturally. |
useAction | Register an action handler. Auto-cleans on onCleanup. |
useInlineTrigger | One-off triggers declared inside a component. |
<TriggerRuntimeProvider> | Inject a custom runtime via Solid’s context API. |
<TriggerScope> | Scope condition/action registrations to a feature subtree. |
Quick start
Section titled “Quick start”Three small files. The trigger reads like a spec, components only know about their own port.
1. Define the trigger
Section titled “1. Define the trigger”2. Wrap the tree
Section titled “2. Wrap the tree”3. Wire components
Section titled “3. Wire components”Click the button — Toast logs. Toggle settings.notifications to false — silent.
How Solid integration differs from React
Section titled “How Solid integration differs from React”Solid components only run their setup once. No useCallback, no dependency arrays, no ref dance — just close over what you need. Condition getters that read signals automatically see the latest value at fire time because Solid signals are pure functions.
Cleanup
Section titled “Cleanup”All composables auto-clean via onCleanup — they work both inside component setup and inside detached createRoot() scopes. No manual disposer plumbing.