在React中,“组合组件”和“DOM组件”的区别是什么?
官方文档在几个地方对这两个术语进行了对比,但从未真正解释过它们。例如: https://facebook.github.io/react/docs/component-specs.html https://facebook.github.io/react/docs/working-with-the-browser.html 从React 0.14开始,一些测试工具方法(如findRenderedDOMComponentWithClass)不再使用“DOM组件”。
官方文档在几个地方对这两个术语进行了对比,但从未真正解释过它们。例如: https://facebook.github.io/react/docs/component-specs.html https://facebook.github.io/react/docs/working-with-the-browser.html 从React 0.14开始,一些测试工具方法(如findRenderedDOMComponentWithClass)不再使用“DOM组件”。
<div>
,<input>
等吗?而复合组件则是由您自己定义的,如<Mycomponent />
和其他由组件组成的组合组件? - Daniel B