fetch-router@0.11.0
Breaking Changes📦 remixView on GitHub →
⚠ 1 breaking✨ 1 features🔧 3 symbols
Summary
This release introduces a breaking change by replacing the Router class with a createRouter factory function and makes the middleware property optional in route mappings.
⚠️ Breaking Changes
- The Router class is no longer exported. You must now use the createRouter() factory function to instantiate a router.
Migration Steps
- Replace 'new Router()' with 'createRouter()'.
- Update imports to use 'createRouter' for instantiation and 'type Router' for TypeScript type annotations.
- Optional: Remove empty middleware arrays from router.map() calls to simplify code.
✨ New Features
- The middleware property in route handler objects passed to router.map() is now optional.
🔧 Affected Symbols
RoutercreateRouterrouter.map