Skip to content

Releases: atlassian-labs/react-resource-router

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

v0.13.0

23 Sep 04:59
Compare
Choose a tag to compare

New features

  • New useQueryParam(param: string) hook to get and set a query string parameter. Returns [value: string | undefined, setParam: (v: string) => undefined]
  • New usePathParam(param: string) hook to get and se a path parameter. Returns [value: string | undefined, setParam: (v: string) => undefined]

Bug fixes

  • createResource and useResource now return handle the correct type for data in Typescript

v0.12.1

20 Aug 00:26
Compare
Choose a tag to compare

New features

  • Add /utils package entry point to have access to matchRoute, findRouterContext and few more

v0.12.0

19 Aug 23:04
Compare
Choose a tag to compare

Breaking changes

  • useResource returns an object now instead of an array with a object inside
  • getRouteContext utility has been renamed findRouterContext
  • RouterStoreContext type has been renamed RouterContext

New features

  • useResource now accepts a routerContext option to manipulate resources and resource keys independently from current location
  • new createRouterContext utility

Bug fixes

  • Fix types to be compatible with Typescript v3.7+

Patch to include the compatible version of TypeScript as a peer dependency

12 Jun 06:54
Compare
Choose a tag to compare

At this time, create-react-app's TypeScript template uses a version of the typescript package which is incompatible with the library. This patch adds the correct version as a peer dependency so that consumers are warned of this at install time.