fetch-router@0.14.0
Breaking Changes📦 remixView on GitHub →
⚠ 2 breaking✨ 1 features🔧 3 symbols
Summary
This release simplifies the API by consolidating request handler types and removing generics from RequestHandler, while exposing MatchData for custom routing logic.
⚠️ Breaking Changes
- The `BuildRequestHandler` type has been removed. Replace all instances with the `RequestHandler` type.
- The `T` generic parameter has been removed from the `RequestHandler` type. Request handlers are now restricted to returning a `Response` object.
Migration Steps
- Replace `BuildRequestHandler` with `RequestHandler` in your type definitions.
- Remove generic type arguments from `RequestHandler` (e.g., change `RequestHandler<MyType>` to `RequestHandler`).
- Ensure all request handlers return a standard `Response` object.
✨ New Features
- Exported the `MatchData` type to the public API, enabling the creation of custom matchers for the router's `matcher` option.
🔧 Affected Symbols
BuildRequestHandlerRequestHandlerMatchData