What problem does it solve?
This Skill accelerates the development of user-facing features in Blazor by providing a ready-to-use pattern for reactive state management, optimistic updates, and cache invalidation, reducing boilerplate and risk of inconsistencies.
Core Features & Use Cases
- Reactive State: Components automatically re-render when underlying data changes.
- Optimistic Updates: UI updates instantly while mutations are processed, with rollback on failure.
- Cache Invalidation: Ensures data freshness by invalidating and refreshing cached queries after mutations.
- Use Case: Implementing a “like” button that updates instantly and persists to the backend, while other tabs reflect the change in real time.
Quick Start
Create a new feature page under src/Web/BookStore.Web/Components/Pages/{Feature}.razor, wire it into a ReactiveQueryInit template, and configure QueryInvalidationService to map domain events to query keys. Then run the app and verify SSE-driven updates and proper rollback on errors.