Skip to content

Releases: freckle/react-hooks

v7.0.0

20 Dec 18:22
514eb26
Compare
Choose a tag to compare

Remove support for flow.

v5.2.0

04 Nov 13:49
a10d60c
Compare
Choose a tag to compare

Bump Version

v5.1.0

04 Nov 13:41
a10d60c
Compare
Choose a tag to compare

Adds missing exports

v5.0.0

03 Nov 15:21
140d98d
Compare
Choose a tag to compare

Adds useSafeImperativeHandle and useSafeImperativeHandleExtraDeps

v4.0.0

16 Oct 18:17
v4.0.0
a029ef4
Compare
Choose a tag to compare

Uses React 18.

v3.0.1

28 Apr 18:48
a029ef4
Compare
Choose a tag to compare

Fix useSafeCallback, useSafeCallbackExtraDeps, and unsafeMkCallbackFn to accept functions of any arity.

v3.0.0

26 Apr 14:42
118ff73
Compare
Choose a tag to compare

Updates the type of CallbackFn related functions to avoid being able to use the any type. This effectively was allowing any to be sent as extraDeps to any of the useSafe* style hooks.

Unfortunately, with this change the TS compiler is unable to get rid of the unknown type without some help. This release requires type signatures in order to nudge the compiler in the right direction

This originally had correct inference of foo inside of the first parameter of useSafeEffectExtraDeps.
After the update the compiler will infer foo: unknown and you will be unable to use it in any meaningful way. If you supply useSafeEffectExtraDeps with the types it will work though.

const foo: Foo = ...
- useSafeEffectExtraDeps(
+ useSafeEffectExtraDeps<{foo: Foo}>(
  ({ foo }) => {
    //Do stuff with foo
  },
  { foo: { value: foo, comparator: (a, b) => a === b } }
);

v2.0.1

13 Jul 20:14
1b60c85
Compare
Choose a tag to compare

Improves hook interfaces by removing ambiguous {} type.

v2.0.0

03 Jun 17:49
v2.0.0
c35b743
Compare
Choose a tag to compare

Migrated to TypeScript

Initial Release

21 Apr 17:22
c8589bc
Compare
Choose a tag to compare

Initial Release