Skip to content

Releases: badgateway/react-ketting

v4.0.10

12 Oct 17:36
bdf410e
Compare
Choose a tag to compare
  • #98: Return type of submit() function is changed from void to Promise<void> @BeckyPollard
  • #95: loading did not go back to true if an error occurred in some cases.

v4.0.9

12 Oct 17:35
e337f43
Compare
Choose a tag to compare
  • #94: Complete rewrite of useInfiniteCollection it had still more issues
    in edge-cases, so it needed a higher-approach to fixing it.

Note: a bunch of versions were skipped. They were all released as beta to test issues with this hook.

v4.0.2

09 Jun 17:42
8a0f3d0
Compare
Choose a tag to compare
  • #90 useInfiniteCollection did not refresh correctly with if there was only 1 page.

v4.0.1

07 Jun 20:42
013a9ec
Compare
Choose a tag to compare
  • #87 useInfiniteCollection's refreshOnStale did not function correctly it now fully resets the component.

v4.0.0

19 May 04:34
7d9edec
Compare
Choose a tag to compare

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

v3.0.2

20 Mar 01:17
2451cdc
Compare
Choose a tag to compare

What's Changed

  • Renaming usePagedCollection to useInfiniteCollection by @evert in #75
  • Don't return a new 'items' property if nothing changed by @evert in #76

Full Changelog: v3.0.1...v3.0.2

v3.0.1

19 Mar 02:37
6146589
Compare
Choose a tag to compare
  • useCollection now returns 'resourceState' and 'resource', which makes it
    less likely that someone needs both useResource and useCollection in
    the same component. These objects were already readily available, so might
    as well return them.

v3.0.0

22 Feb 01:06
c86db80
Compare
Choose a tag to compare
  • BC Break: The signature of useResource has changed, but only if you were
    passing options. If you called useResource(options) before, it must now
    be structured as useResource(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.

2.1.5

22 Feb 00:53
9397a2c
Compare
Choose a tag to compare
  • 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.

See PR #67 for details. Backported in #70 for the 2.x.x branch.

v2.1.4

01 Sep 18:47
d8534a7
Compare
Choose a tag to compare
  • In some scenarios RequireLogin could crash due to a function sometimes
    being called before it's defined (@mihok).
  • Works with Typescript 4.4 strict.