Hi,
Small question, I found that React.useState
reflects the returned value in the type of the first list item, so let (e, setE) = React.useState(_ => null)
would turn e
into a nullable. I’ve got a type that I wrote out for the value of a state I want to track, however, it only gets populated later by an effect. I want the initial value to be null
though, since I can’t create an empty instance of my type. How do I solve this?