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
enabled
field from exported types as was never implemented - Fixed Flow type for update resource callback
v0.17.0
New features
Router.requestResources
now accepts atimeout
option 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
useResource
type in TS - Fixed type for
Link
component in TS and Flow
v0.16.2
Improvements & bug fixes
- Expose
isGlobal
inRouter
andMemoryRouter
to 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
Link
prefetch
prop withhover|mount
support - Add
onPrefetch
Router prop that is triggered when prefetch happens to enable other side effects to be triggered
v0.15.0
New features
createRouterSelector
API to create custom hooks to reduce re-rendersLink
propto
now supports a route object aspushTo
andreplaceTo
actions that take a route object as argumentRouter
not accepts aninitialRoute
prop
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
update
function - Upgrade Flow
v0.14.0
New features
useQueryParam
andusePathParam
setters now allow to specify if history should be pushed (default) or replaced- New
basePath
prop to Router component to prefix all urls
Breaking changes
- Removed
noopRouterDecorator
export. 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