A super tiny (~1kb) reactive library that observes object mutations and automatically recomputes dependent functions.
Hyperactiv is a lightweight reactive JavaScript library that observes mutations in objects and arrays and automatically recomputes functions that depend on those changes. It solves the problem of managing state updates and side effects by tracking dependencies implicitly, so developers don't need to declare them manually.
JavaScript developers building reactive UIs, state management systems, or data-driven applications who value minimal bundle size and automatic dependency tracking.
Developers choose Hyperactiv for its extreme simplicity and tiny footprint (~1KB), combined with powerful automatic dependency detection that reduces boilerplate and eliminates manual dependency management.
A super tiny reactive library. :zap:
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Functions automatically track which observed properties they use, eliminating manual dependency lists, as shown in the minimal example where changing 'a' or 'b' triggers recomputation without explicit declarations.
At only ~1KB minified and gzipped, it's one of the smallest reactive libraries, making it ideal for performance-sensitive projects where every kilobyte counts, as highlighted in the README badges.
Supports observing objects, arrays, and classes with configurable options like batching, property filtering, and method binding, offering fine-grained control without bloating the API.
Handles synchronous, asynchronous, and nested computations with auto-run and callback options, demonstrated in code samples for chaining and async operations.
In performance tests, Hyperactiv is slower than libraries like MobX, as admitted in the README's benchmark section, which could impact applications with high-frequency updates or deep nesting.
Core functionality is minimal; essential integrations like React support or HTTP caching require importing separate modules, adding setup complexity compared to all-in-one solutions.
Computed functions must be explicitly disposed of using the `dispose` function to prevent memory leaks, introducing overhead and risk if forgotten, as noted in the usage section.