Trying to get the hang of typescript and it's weird syntaxes.
How do you read the following in your head?
const [user, setUser] = useState<IUser>({name: 'Jon'});
Am I right to say useState
takes <IUser>
as an input?
Or useState
takes an input of <IUser>
?
example stolen from: https://stackoverflow.com/a/53650561/9780778