- [Typescript]
useState
doesn't require a default value anymore; in which case it'll default toundefined
- [Typescript]
useRef
doesn't require a default value anymore; in which case it'll default toundefined
Examples:
const [value, setValue] = useState<number>();
// value: number | undefined;
const [value, setValue] = useState<number>(1);
// value: number;