Releases: atlassian-labs/react-resource-router
Releases · atlassian-labs/react-resource-router
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.
Patch to fix bug where TS types were being exported from the built esm module
This release fixes a bug that was causing plain JS projects using the library to blow up. Types are now exported using the export type
keyword.
v0.11.2
- Add logo and fix badges
Patch to include @babel/plugin-transform-runtime
This patch release ensures that @babel/plugin-transform-runtime
is included in the core suite of babel plugins used to build the library. This will prevent errors in environments that do not support async/await natively.