Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 1846

Typing a useState

$
0
0

you can also annotate in the tuple:

let (user: loadable<user, 'e>, setUser) = React.useState(_ => Loading)

Might be a bit more idiomatic.


Viewing all articles
Browse latest Browse all 1846

Trending Articles