4 ms·
The one place where react typings are disappointing to me is that all elements are typed as JSX.Element, meaning you can’t assert a specific type of child eleme
by presentation 6y ago
The one place where react typings are disappointing to me is that all elements are typed as JSX.Element, meaning you can’t assert a specific type of child element. Usually not a big deal but would be useful in a number of cases.
- nsonha 6y agoIt's a limitation of TS, not react. Flow for example can type elements more accurately.