Chapter 7. Common Questions

React has grown from a UI library to an enormous ecosystem, which can make it difficult to get ahold of the big picture. The following are a few common questions to help you understand React in the context of the broader ecosystem.

Is React a Templating Language?

No, React is not a template library. A template engine provides an imperative layer on top of HTML. In contrast, React is a set of tools that allow developers to use JavaScript to generate HTML.

Is React Similar to Web Components?

Web Components are not just one thing; they are a collection of standards that will, over time, be implemented in all major browsers. A React component serves the same function as a Web Component, but because React is not based on standards, it does not rely on support from any particular browser. As browser support grows, React may support the Web Components spec.

What Is the Difference Between the Virtual DOM and a Shadow DOM?

React’s virtual DOM is a tool for batching and efficiently applying updates. The Shadow DOM, which is one of the four technologies that compose the Web Components spec, refers to the ability of a browser to insert an isolated and external subtree into the main DOM.

How Can React Be Used with Other Frameworks?

React is just the view layer, and as such, can be used to replace the view layer in other frameworks including AngularJS and Ember.js. Generally speaking, developers tend to prefer using React with its own ecosystem of tools rather ...

Get What React Is and Why It Matters now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.