Releases: atlassian-labs/react-resource-router
Releases · atlassian-labs/react-resource-router
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
v0.13.0
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
New features
- Add
/utils
package entry point to have access tomatchRoute
,findRouterContext
and few more
v0.12.0
Breaking changes
useResource
returns an object now instead of an array with a object insidegetRouteContext
utility has been renamedfindRouterContext
RouterStoreContext
type has been renamedRouterContext
New features
useResource
now accepts arouterContext
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
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.