Releases: freckle/react-hooks
Releases · freckle/react-hooks
v7.0.0
v5.2.0
v5.1.0
v5.0.0
v4.0.0
v3.0.1
v3.0.0
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
v2.0.0
Initial Release
Initial Release