Releases: badgateway/react-ketting
Releases · badgateway/react-ketting
v4.0.10
v4.0.9
v4.0.2
v4.0.1
v4.0.0
react-ketting v4
A new major version! We bumped the version number, because some BC-breaks were introduced.
Changes:
- A new
<SelectLink />
component. This component renders a HTML<select>
form field, and populates the<option>
list with a list of links from a resource. - A new
useNewResource
hook. This hook is explicitly designed to let users create new resources with aPOST
request, and continue editing the newly created resource withPUT
requests. This functionality existed inuseResource
before, but it never worked well. - Dramatically reduced the number of renders, in some cases from 5 to 1. To get the maximum benefit, make sure you're on React 18.
useResource
no longer has amode
option. If you usedPUT
here, you can just remove the option as it's the default. If you usedPOST
, you'll want to migrate touseNewResource
.- Fix an infinite rendering bug when passing a promise as the resource argument to
useResource
v3.0.2
v3.0.1
v3.0.0
- BC Break: The signature of
useResource
has changed, but only if you were
passing options. If you calleduseResource(options)
before, it must now
be structured asuseResource(resource, options)
to be consistent with
every other hook. See #63 for more information. - In some cases when a React component passes a new resource as a string to
useResource, the useResource might return "undefined" for the resource,
which can result in a white screen of death.
This one was a bit of a doozy, check the PR for more information: #67 - Remove an unneeded initial render in
useCollection
.