// the find
coderwhy/hy-event-store
An event-based global state management tool for vue, react, mini-program, ect.
A minimal event bus and reactive state store for JavaScript, targeting Vue, React, and WeChat mini-programs. It reimplements a subset of Vuex/Pinia in ~200 lines with no framework dependency. Useful when you want shared state without pulling in a full framework store.
Genuinely framework-agnostic — the core has zero dependencies on Vue or React internals, so it actually works anywhere JS runs. The API surface is tiny: on/off/emit for the event bus, setState/onState/dispatch for the store — you can learn it in five minutes. Separating HYEventBus and HYEventStore as distinct classes keeps the two concerns from bleeding into each other.
No TypeScript — you get no type safety on state shape, action names, or event payloads, which is a real problem in any non-trivial app. Last commit was December 2023 and the README promises future docs and features that never arrived. There are no tests beyond a couple of manual script files in Test/ that hit a hardcoded IP — not automated, not runnable in CI. At 410 stars it has a small community, so if you hit an edge case you're reading 200 lines of source yourself.