react-elements-Q&A Flashcards
1
Q
What is React?
A
React is a JavaScript library for creating user interfaces.
2
Q
What is a React element?
A
e basic building block in a react application, it is an object representation of a virtual DOM node.
3
Q
How do you mount a React element to the DOM?
A
const container = document.querySelector('#root'); const root = ReactDOM.createRoot(container); root.render(h1);