老师请问源码里面的 React$Element、React$Node、React$Ref 这样的 flow type,怎么找不到定义?
来源:2-7 context
hujunil
2019-02-18
老师请问源码里面的React$Element、React$Node、React$Ref 为什么找不到定义?
写回答
1回答
-
这些应该是flow内置的私有类型,是在flow里面定义好的,所以你在React里面找不到定义,https://github.com/facebook/flow/blob/v0.92.1/lib/react.js#L169 你可以看一下,也可以参考下面一个网页https://www.saltycrane.com/flow-type-cheat-sheet/latest/#builtins
112019-02-20
相似问题