4 ms·
Sure, the "magic" bit of hooks that people are talking about doesn't really affect their type signature See eg, setState: `function useState<S>(initialState: S
by gcommer 8y ago
Sure, the "magic" bit of hooks that people are talking about doesn't really affect their type signature
See eg, setState: `function useState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];`
from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/ab0806bfb5b2ad74dccacd4780be688e96d2ea5a/types/react/index.d.ts#L809 https://github.com/DefinitelyTyped/DefinitelyTyped/blob/ab08...