TimeWarp.State (previously known as Blazor-State) is a fully asynchronous state management library for Blazor applications, leveraging the res pipeline to implement the Flux pattern. It handles both Reducers and Effects consistently using async Handlers, simplifying the management of asynchronous operations throughout your app.
By utilizing the TimeWarp.Mediator pipeline, TimeWarp.State enables a flexible, middleware-driven architecture for managing state, similar to the request-processing pipeline in ASP.NET. This approach allows developers to inject custom behaviors, such as logging, validation, and caching, directly into the state management flow.
Hosts consume TimeWarp.Mediator 14-beta via generated AddGeneratedMediator<ClientPipeline>() / named pipelines — not MediatR and not reflection AddMediator().
In addition to the core library, we offer TimeWarp.State.Plus (routing, persistence, action tracking) and TimeWarp.State.Telemetry (OpenTelemetry action spans for the Aspire dashboard or any OTel backend). The persistence sample shows session storage and local storage with [PersistentState]. The render control sample shows ShouldRender, parameter checks, and RegisterRenderTrigger.
If you find this project useful, please give it a star. Thanks!
I recommend the tutorial for a step-by-step guide to building a Blazor app with TimeWarp.State.
See full documentation.
dotnet add package TimeWarp.State
dotnet add package TimeWarp.State.Plus
dotnet add package TimeWarp.State.TelemetryCheck out the latest NuGet packages on the TimeWarp Enterprises NuGet page.
View the Release Notes for detailed information on each release.
This project is licensed under the Unlicense.
Your contributions are welcome! Before starting any work, please open a discussion.
Help with the documentation is also greatly appreciated.
If you have an issue and don't receive a timely response, feel free to reach out on our Discord server.