Releases: atlassian-labs/react-resource-router
Releases · atlassian-labs/react-resource-router
v0.18.0
New features
- Resources can now be limited by both expiration time and count. The new option for
createResource,maxCache, allows consumers to defined how many resources can be kept in the cache. Once the threshold limit is reached, a Least Recently used resource gets deleted, making space for the new requested resource of the same type.
Bug fixes
- Removed
enabledfield from exported types as was never implemented - Fixed Flow type for update resource callback
v0.17.0
New features
Router.requestResourcesnow accepts atimeoutoption to skip waiting for resources that take to long to fetch- Add node 16 support
Type fixes
- Add generics for typing resource data in Flow types
- Expose
useResourcetype in TS - Fixed type for
Linkcomponent in TS and Flow
v0.16.2
Improvements & bug fixes
- Expose
isGlobalinRouterandMemoryRouterto support scoped and local routers (useful for tests) - Fix missing exported types, missing props and TS types for
getDataLoader
v0.16.0
New features
- Add
Linkprefetchprop withhover|mountsupport - Add
onPrefetchRouter prop that is triggered when prefetch happens to enable other side effects to be triggered
v0.15.0
New features
createRouterSelectorAPI to create custom hooks to reduce re-rendersLinkproptonow supports a route object aspushToandreplaceToactions that take a route object as argumentRouternot accepts aninitialRouteprop
Bug fixes
- Fixed router actions Flow types
- Reduced route matching performance cost by better caching already matched routes
Chore
- Update react-sweet-state to v2.5.1
v0.14.2
Flowtype fixes
- history was already untyped, so make it officially any
v0.14.1
Flowtype fixes
- Fix Flow type definition for resource
updatefunction - Upgrade Flow
v0.14.0
New features
useQueryParamandusePathParamsetters now allow to specify if history should be pushed (default) or replaced- New
basePathprop to Router component to prefix all urls
Breaking changes
- Removed
noopRouterDecoratorexport. Create and pass a memory history for your storybooks/tests
v0.13.2
Bug fixes
- Expose mocks in a dedicated entry:
react-resource-router/mocks
v0.13.1
Bug fixes
- Fix several Flow types issues