Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/ab08...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: