Reactive Programming
What is Reactive Programming?
Reactive Programming: Reactive programming models data sources as observable streams. You define transformations on those streams, and any time the source emits a new value, the transformation pipeline automatically re-runs. Popularised by RxJS in JavaScript. Reactive programming treats data as streams that change over time, and lets you describe how derived values should follow those changes. When the source emits a new value, everything that depends on it updates automatically.
Frequently asked questions about Reactive Programming
How is Reactive Programming used in practice?
A spreadsheet is the simplest example. In front-end development, RxJS made the idea popular, and frameworks like Vue, Svelte and Angular signals use reactive values so the interface updates itself when data changes.
What should you keep in mind with Reactive Programming?
It makes complex, event-heavy interfaces much easier to build: live search, real-time dashboards, forms whose fields depend on each other. The learning curve can be steep, especially with RxJS operators. Use the reactivity your framework provides for everyday state, and reach for full stream libraries when you are combining many asynchronous event sources.
At a glance
| Category | Programming paradigms |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |