rx4u Examples

Comprehensive examples showcasing rx4u's reactive programming capabilities. Learn by example with practical, real-world use cases.

Creating and Subscribing to Streams

Basics

Learn the fundamentals of creating streams and subscribing to them.

Stream CreationSubscriptionCleanup

Transforming Data with map

Transformation

Transform stream values using the map operator.

map operatorData transformationType preservation

Filtering Data with Predicates

Filtering

Filter stream values based on conditions.

filter operatortake operatorskip operatorPredicate functions

Handling Async Operations

Async

Work with promises and async data using switchMap.

switchMap operatorPromise handlingAsync transformation

Robust Error Handling

Error Handling

Handle errors gracefully with catchError and retry.

catchError operatorretry operatorError recoveryFallback values

Debouncing User Input

Utility

Optimize user input handling with debounceTime.

debounceTime operatordistinctUntilChanged operatorInput optimizationSearch patterns

Combining Multiple Streams

Combination

Combine data from multiple sources using combineLatest and zip.

combineLatest operatorzip operatorStream combinationData correlation

Reactive State Management

State

Manage application state reactively with createState.

createState functionReactive stateDerived stateState management patterns