Current Time: @currentTime
Counter: @counter
@code { private string currentTime = ""; private int counter = 0; private IDisposable? timeSubscription; private IDisposable? counterSubscription; protected override void OnInitialized() { // Create a time stream timeSubscription = Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(1)) .Select(_ => DateTime.Now.ToString("HH:mm:ss")) .Subscribe(time => { currentTime = time; InvokeAsync(StateHasChanged); }); // Create a counter stream counterSubscription = Observable.Timer(TimeSpan.Zero, TimeSpan.FromMilliseconds(100)) .Subscribe(tick => { counter = (int)tick; InvokeAsync(StateHasChanged); }); } public void Dispose() { timeSubscription?.Dispose(); counterSubscription?.Dispose(); } } ``` This tutorial has covered the basics of getting started with `System.Reactive.Wasm`. You've learned how to set up your project, use the WASM scheduler, optimize performance, and integrate with WASM frameworks. From here, you can explore more advanced System.Reactive features, all optimized for WebAssembly environments. ----- ## Thanks We want to thank the following contributors and libraries that help make System.Reactive.Wasm possible: ### Core Libraries - **System.Reactive**: [Reactive Extensions for .NET](https://github.com/dotnet/reactive) - The foundation of reactive programming in .NET. - **Splat**: [Splat](https://github.com/reactiveui/splat) - Cross-platform utilities and service location. - **Mono Runtime**: The Mono WebAssembly runtime that enables .NET in WebAssembly environments. - **Uno.Rx.NET**: [Uno.Rx.NET](https://github.com/nventive/Uno.Rx.NET) - Original implementation that inspired this project. ----- ## Sponsorship The core team members, ReactiveUI contributors and contributors in the ecosystem do this open-source work in their free time. If you use System.Reactive.Wasm, a serious task, and you'd like us to invest more time on it, please donate. This project increases your income/productivity too. It makes development and applications faster and it reduces the required bandwidth. [Become a sponsor](https://github.com/sponsors/reactivemarbles). This is how we use the donations: * Allow the core team to work on System.Reactive.Wasm * Thank contributors if they invested a large amount of time in contributing * Support projects in the ecosystem ----- ## Support If you have a question, please see if any discussions in our [GitHub Discussions](https://github.com/reactiveui/reactive.wasm/discussions) or [GitHub issues](https://github.com/reactiveui/reactive.wasm/issues) have already answered it. If you want to discuss something or just need help, here is our [Slack room](https://reactiveui.net/slack), where there are always individuals looking to help out! Please do not open GitHub issues for support requests. ----- ## Contribute System.Reactive.Wasm is developed under an OSI-approved open source license, making it freely usable and distributable, even for commercial use. If you want to submit pull requests please first open a [GitHub issue](https://github.com/reactiveui/reactive.wasm/issues/new/choose) to discuss. We are first time PR contributors friendly. See [Contribution Guidelines](https://www.reactiveui.net/contribute/) for further information how to contribute changes. ----- ## License System.Reactive.Wasm is licensed under the [MIT License](https://github.com/reactiveui/reactive.wasm/blob/main/LICENSE).