Skip to content

v4.0.0

Compare
Choose a tag to compare
@evert evert released this 19 May 04:34
· 45 commits to main since this release
7d9edec

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 a POST request, and continue editing the newly created resource with PUT requests. This functionality existed in useResource 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 a mode option. If you used PUT here, you can just remove the option as it's the default. If you used POST, you'll want to migrate to useNewResource.
  • Fix an infinite rendering bug when passing a promise as the resource argument to useResource