You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AspecialnotethatIdiscouragetheuseofmost`...Element`typesbecauseofhowblack-boxy`JSX.Element` is. Youshouldalmostalwaysassumethatanythingproducedby`React.createElement`isthebasetype`React.ReactElement`.
705
+
[@Ferdaber's note](https://github.com/sw-yx/react-typescript-cheatsheet/pull/69): I discourage the use of most `...Element` types because of how black-boxy `JSX.Element` is. You should almost always assume that anything produced by `React.createElement` is the base type `React.ReactElement`.
707
706
708
707
**Namespace: JSX**
709
708
@@ -713,7 +712,7 @@ A special note that I discourage the use of most `...Element` types because of h
Anythingnotlistedaboveisconsideredaninternaltypeandnotpublic. Ifyou're not sure you can check out the source of `@types/react`. The types are annotated accordingly.
0 commit comments