What problem does it solve?
Many UI components must handle nullable responses, exceptions, and inconsistent gateway errors which leads to scattered null checks and try/catch blocks in the UI. ResponseResult<T> centralizes success and failure outcomes so components can handle results deterministically and present consistent user feedback.
Core Features & Use Cases
- Encapsulates gateway success or failure using SuccessResult and FailedResult typed outcomes.
- Provides Switch and SwitchAsync handlers to route to success actions or failure actions and to avoid null checks and UI exceptions.
- Uses ProblemDetails for structured error information and integrates snackbar notifications and navigation on success or failure.
- Common uses include create and load operations in Blazor components, server-side data grid pagination, and consistent error reporting for gateway calls.
Quick Start
Use the response-result guidance to handle gateway responses in your Blazor component by calling Switch or SwitchAsync to show snackbars and navigate on success or failure.