Reaction: Compound components and DOM components

What is the difference between a “compound component” and a “DOM component” in a reaction?

Official documents compare the two terms with each other in several places, but do not really explain them. For example: https://facebook.imtqy.com/react/docs/component-specs.html https://facebook.imtqy.com/react/docs/working-with-the-browser.html

From reaction 0.14, several test utils methods, such as findRenderedDOMComponentWithClass, no longer accepts "DOM components".

+5
source share
1 answer

It is clearly defined on the test-utils page. Thus, the DOM component is a simple div or span. Unlike CompositeComponent, which can be a div, but created, but using React.createClass ().

+5
source

Source: https://habr.com/ru/post/1233586/


All Articles