A functional reactive programming library for TypeScript and JavaScript that turns event-driven code into clean, declarative streams.
Bacon.js is a functional reactive programming library for TypeScript and JavaScript that enables developers to work with asynchronous events and dynamic values using declarative streams. It solves the problem of complex, imperative event handling by providing abstractions like EventStreams for discrete events and Properties for stateful values, which can be transformed and combined with functional operators.
JavaScript and TypeScript developers building interactive applications who need to manage complex event-driven logic, such as UI interactions, real-time data updates, or asynchronous workflows.
Developers choose Bacon.js for its simplicity, consistent semantics between EventStreams and Properties, and atomic updates that prevent glitches. Unlike some alternatives, it avoids cold observables and doesn't automatically terminate streams on errors, giving more control over error handling.
Functional reactive programming library for TypeScript and JavaScript
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Prevents glitches by ensuring consistent state changes when multiple properties update simultaneously, a core feature highlighted in the README.
Separates discrete events (EventStreams) from stateful values (Properties), simplifying mental models and avoiding issues with cold observables or automatic stream termination.
Error events propagate without terminating streams, allowing graceful error recovery using methods like onError and mapError, as detailed in the error handling section.
Offers essential operators like map, filter, merge, and flatMap for declarative stream manipulation, demonstrated in examples for transforming and combining events.
Past versions introduced disruptive changes, such as removing lazy evaluation in 2.0 and function construction rules in 3.0, requiring migration efforts that could break existing code.
Has a smaller community and fewer third-party integrations compared to RxJS, which may result in less tooling, documentation, or support for niche use cases.
Atomic updates and consistency checks can incur overhead, making it less ideal for high-performance scenarios where libraries like Kefir.js are optimized for speed.
Bacon is an open-source alternative to the following products: