Releases: blakeembrey/react-route
Releases · blakeembrey/react-route
Faster Routes
Changed
- Use
<Route component />to render components going forward, avoids re-rendering when parameters don't change
Component Prop
Changed
- Use
componentprop onRouteto minimize the number of re-renders of child elements - Remove re-use of React Location context, initialize a separate context for routes
Propagate hash and search changes
Fixed
- Propagate hash and search changes to child routes
Path-To-Regexp 6
Changed
- Upgrade
path-to-regexp@6
Latest Path-To-RegExp
Changed
- Upgraded
path-to-regexp - Removed
<Match />and<UseRoute />components, preferuseMatchand<Route end={false} />
Expose `useMatch`
Added
- With the addition of
useRouterin@blakeembrey/react-location, exposeuseMatchto match withpath-to-regexp
Declarative `<Switch />`
Changed
- Remove implicit magic around changing
Routechildren during render and matching first only, rely on declarative<Switch />for explicit behavior
Proxy Format Location
Fixed
- Forward requests to format the URL to parent router
Better Redirect Handling
Changed
- Improved route child signature to avoid passing
urlandlocationas two separate params - just destructure from{ url }instead
Fixed
- Better URL redirection handling of nested routes, avoids overhead of re-creating
LocationRoute
Latest React.js
Fixed
- Fix changes in latest react release with stable hooks