fetch-router@0.13.0
Breaking Changes📦 remixView on GitHub →
⚠ 3 breaking✨ 1 features🔧 16 symbols
Summary
This release renames the 'route handlers' terminology to 'controllers/actions', updates route helper naming, and introduces method-specific route aliases like get() and post().
⚠️ Breaking Changes
- Renamed 'route handlers' terminology to 'controller/action'. This affects types and property names used in router mapping.
- Renamed 'formAction' route helper to 'form' and moved route helpers to 'lib/route-helpers/' subdirectory.
- The 'middleware' property is now mandatory when using the object-style controller/action format ({ middleware, actions } or { middleware, action }).
Migration Steps
- Replace 'RouteHandlers' type with 'Controller', 'RouteHandler' with 'Action', and 'BuildRouteHandler' with 'BuildAction'.
- Rename 'handlers' property to 'actions' and 'handler' property to 'action' in your controller objects.
- Update 'formAction' imports and calls to 'form'.
- If using object-style handlers without middleware, either add an empty middleware array or refactor to use plain request handler functions/objects.
- Update import paths for route helpers if importing from subdirectories.
✨ New Features
- Added functional aliases (get, post, put, patch, del) for creating routes that respond to specific HTTP methods.
🔧 Affected Symbols
RouteHandlersRouteHandlerBuildRouteHandlerformActionFormActionOptionsControllerActionBuildActionformFormOptionsgetpostpatchdelrouter.maprouter.any