Closed youngjuning closed 10 months ago
Good question. Is there any answers ?
@StevieTaylor updated
@StevieTaylor updated
在写tsx的过程中, 我会根据编辑器对我的提示来书写类型, 比如render()方法的返回类型我使用JSX.Element, 其他的我用React.ReactNode, 我也想知道有啥区别, 什么情况下用JSX.Element, 什么情况下用React.ReactNode.
答案:https://zhuanlan.zhihu.com/p/353239684