Skip to content

Releases: atlassian-labs/react-resource-router

v0.18.0

04 Aug 07:01
Compare
Choose a tag to compare

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

30 Apr 02:39
Compare
Choose a tag to compare

New features

  • Router.requestResources now accepts a timeout 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

14 Apr 07:31
Compare
Choose a tag to compare

Improvements & bug fixes

  • Expose isGlobal in Router and MemoryRouter to support scoped and local routers (useful for tests)
  • Fix missing exported types, missing props and TS types for getDataLoader

v0.16.0

01 Feb 00:43
Compare
Choose a tag to compare

New features

  • Add Link prefetch prop with hover|mount support
  • Add onPrefetch Router prop that is triggered when prefetch happens to enable other side effects to be triggered

v0.15.0

29 Dec 02:19
Compare
Choose a tag to compare

New features

  • createRouterSelector API to create custom hooks to reduce re-renders
  • Link prop to now supports a route object as
  • pushTo and replaceTo actions that take a route object as argument
  • Router not accepts an initialRoute 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

02 Nov 00:11
Compare
Choose a tag to compare

Flowtype fixes

  • history was already untyped, so make it officially any

v0.14.1

01 Nov 23:51
Compare
Choose a tag to compare

Flowtype fixes

  • Fix Flow type definition for resource update function
  • Upgrade Flow

v0.14.0

28 Oct 00:16
Compare
Choose a tag to compare

New features

  • useQueryParam and usePathParam 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

12 Oct 04:30
Compare
Choose a tag to compare

Bug fixes

  • Expose mocks in a dedicated entry: react-resource-router/mocks

v0.13.1

12 Oct 01:17
Compare
Choose a tag to compare

Bug fixes

  • Fix several Flow types issues