A minimal reactive signals library blending @preact/signals-core API with solid-js inspired features, at 816 bytes.
µsignal is a minimal reactive signals library that blends the API of @preact/signals-core with features inspired by solid-js. It provides core reactivity primitives—signals, computed values, and effects—in an ultra-lightweight package (816 bytes minified with brotli). It solves the need for a small, fast, and flexible reactivity system that can integrate with various frameworks or standalone JavaScript projects.
Frontend developers and library authors who need a lightweight, framework-agnostic reactivity system, especially those familiar with or transitioning from Preact Signals or Solid.js.
Developers choose µsignal for its tiny footprint, performance-competitive implementation, and API flexibility—offering multiple patterns (default, functional, Solid-like) in one package. Its enhanced equality handling and lazy computed values provide robustness out of the box.
A blend of @preact/signals-core and solid-js basic reactivity API
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
At 816 bytes minified with brotli, it adds minimal overhead, making it ideal for performance-critical or bundle-size-sensitive applications.
Offers default, functional callback, and Solid.js-like exports, allowing developers to choose familiar syntax without switching libraries, as detailed in the 'Exports - Extra' section.
Uses Object.is for comparisons by default, safely preventing infinite loops from NaN and correctly handling signed zeros, which is explicitly mentioned in the 'Differently thought' section.
Computeds are non-side-effecting and lazy, optimizing performance by recalculating only when dependencies change, a feature highlighted in the README as inspired by recent updates in other libraries.
While it provides a Lit mixin example, integrating with popular frameworks like React or Vue requires custom implementation, increasing setup complexity and maintenance effort.
As a minimal library, it lacks the plugins, dev tools, and community resources available in larger state management solutions, which could hinder debugging and scaling.
The multiple export patterns (e.g., usignal/fn, usignal/solid) might lead to inconsistency in codebases if teams mix styles, and the README admits these are variants that not all developers may prefer.