Counter
The “hello world” of Triggery. Two buttons fire an increment/decrement event; a counter component reacts via useAction and re-renders itself. Nothing more.
File layout
Section titled “File layout”- README.md narrative overview
- index.html Vite entry
Directorysrc/
- App.tsx producers + reactors live here
- main.tsx bootstrap
Directorytriggers/
- notification.trigger.ts the rule
The trigger
Section titled “The trigger”The components
Section titled “The components”That’s the whole thing. The producer and reactor happen to live in the same component, but they could be split — the wiring stays the same. See Notification pipeline for a scenario where they really must split.
Related
Section titled “Related” Notification pipeline The same shape, but with three reactors in three components.
Same recipe — Solid With Solid's createSignal.
Same recipe — Vue Composition API version.
Anatomy of a trigger The createTrigger config in full.