wode-emittery-pattern
CommunityDecouple stores from side effects with type-safe events.
Authorwenerme
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It solves tightly coupled UI/store logic by forcing inter-component communication and side-effect handling to use a consistent event-driven architecture instead of embedding side effects inside state actions.
Core Features & Use Cases
- Typed event contracts: Use
as constevent type objects and strongly typed emitter/data mappings to keep event payloads correct end-to-end. - Store emits only: Zustand (or store) actions only emit events and never run side effects, improving testability and separation of concerns.
- Sidecar handlers: Side-effects like toasts, confirms, and network requests live in sidecar components that subscribe to emitted events using a listener hook pattern.
- Clear naming & structure: Enforce
Module:Actionevent naming to keep large apps organized and discoverable.
Quick Start
Use wode-emittery-pattern when implementing a Zustand store and React sidecar so that store actions emit typed Emittery events and the sidecar components perform the confirm/toast/network work.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: wode-emittery-pattern Download link: https://github.com/wenerme/ai/archive/main.zip#wode-emittery-pattern Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.