Releases: atlassian-labs/react-resource-router
Releases · atlassian-labs/react-resource-router
v0.20.0
v0.19.3
v0.19.2
Improvements & bug fixes
- Changes the TypeScript typings for
ResourceStoreContext
to be an emptyinterface
instead of anany
typedtype
, so that consumers of the library can do a module declaration to extend theResourceStoreContext
to type their own code. #142 - Compile typescript with isolatedModules to remove types from runtime code. #147
v0.19.1
v0.19.0
Breaking changes
- Treat
null
as valid resource data. #107
New features
- Allow
Redirect
component to accept a route object asto
prop. #108 - Ensure compatibility with history@5. #113
- Add
isBrowserOnly
to Resource. More info at https://github.com/atlassian-labs/react-resource-router/blob/master/docs/resources/creation.md
Flowtype fixes
- Type the props provided by the 'withRouter' component. #98
Bug fixes
v0.18.1
Bug fixes
- Fix delete resource potentially erroring when resource cache was not created
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