Helpers¶
Utility functions for common reactive patterns.
Overview¶
ReactiveESP32 includes 30+ helper functions that simplify common reactive programming patterns.
-
namespace Helpers¶
Helper functions for creating reactive computations and effects.
Provides high-level utilities for common reactive patterns like mapping, filtering, combining signals, debouncing, throttling, and more.
- Since
v0.1.0
using namespace RxESP32::Helpers; Signal<int> x(5), y(10); // Map transformation: creates a computed that doubles x auto doubled = Transformation::map(x, [](int v) { return v * 2; }); // Combine signals: creates a computed that sums x and y auto sum = Combinatorial::combine([](int a, int b) { return a + b; }, x, y); // Batch updates: sets x and y together without intermediate notifications Utility::batch([]() { x.set(20); y.set(30); }, x, y); // The last signal triggers notifications (signal y)