Skip to content

Support undefined and null as keys

Latest
Compare
Choose a tag to compare
@finom finom released this 02 Jun 15:41
· 11 commits to main since this release
const store = { x: 1 };
const [value] = useChange(store, 'x' as 'x' | null | undefined); // value is inferred as "number | undefined"

value + 1; // TS error

use-change also doesn't create ghost properties such as "null" or "undefined" anymore.