Menu

[ _Start ]

[ About ]

[ Bio ]

[ Blog ]

[ Contact ]

[ Experiments ]

[ Links ]

...

Ten Reactive Design Patterns

Patterns are not any kind of universal truth, but knowing them gives you vocabulary to express intent. Today, let's talk about Reactivity.

Reactive systems work like a deterministic state graph with two clear boundaries: Event Ingress (#1) as the entry point from the imperative world, and Side Effects (#10) as the exit point back to the outside world.

1. Event Ingress

Ingest discrete external events and continuous streams into the reactive state graph, translating imperative impulses into state updates with automatic subscription cleanup.

2. Atomic State

Create and update simple, single-value reactive units that notify dependents whenever their value changes.

3. Shallow / Deep State

Manage complex objects, lists, and nested structures by choosing between top-level reference tracking (shallow) or fine-grained nested reactivity (deep).

4. Derived State

Compute cached values from existing state that evaluate lazily or eagerly and only recalculate when their specific dependencies change.

5. Writable Derived State

Create state that automatically resets or recalculates when a source changes, while still allowing manual user overrides in between.

6. Remote State

Represent asynchronous remote data as reactive state, declaratively managing loading status, errors, and automatic cancellation of stale requests.

7. Untracked Read

Read the current value of a reactive node inside an effect or derivation without subscribing to it, preventing unwanted re-executions and loops.

8. State Throttling

Delay or rate-limit reactions to rapid state changes over time so downstream computations and network requests are not overwhelmed.

9. State History

Access previous state values for delta comparisons or maintain undo/redo stacks across state transitions over time.

10. Side Effects

Synchronize internal reactive state back to the outside world using either automatic dependency tracking or explicit source subscriptions.

Conclusion

This list is not exhaustive, as reactive programming spans many domain-specific and low-level engine concerns. However, these ten patterns cover the most relevant and practical scenarios required to design, scale, and maintain modern reactive applications.

 

2026-11-25 reactivity design patterns software architecture