React:复合组件vs DOM组件



react中的"composite component"one_answers"DOM component"有什么区别?

官方文档在一些地方将这两个术语相互比较,但从未真正解释它们。例如:https://facebook.github.io/react/docs/component-specs.htmlhttps://facebook.github.io/react/docs/working-with-the-browser.html

从react 0.14的一些测试utils方法,如findRenderedDOMComponentWithClass不再接受"DOM组件"

在test-utils页面中有明确的定义。DOM组件实际上是一个普通的div或span。不像一个可以是div的CompositeComponent,但是它是由React.createClass()创建的。

最新更新