Test yourself under real exam conditions: 50 timed questions, 60 on the clock, pass mark 70%%. Instant score with a full review of everything you got wrong. Free — no account needed.
Exam details
React is a JavaScript library developed by Facebook for building user interfaces. It uses a component-based architecture and a virtual DOM for efficient rendering of dynamic, interactive web applications.
JSX stands for JavaScript XML. It is a syntax extension that lets you write HTML-like code inside JavaScript. JSX is transpiled to React.createElement() calls by tools like Babel before running in the browser.
The Virtual DOM is a lightweight in-memory representation of the real DOM. When state changes, React creates a new virtual DOM tree, diffs it against the previous one, and applies only the minimal set of changes to the real DOM — a process called reconciliation.
A functional component is a plain JavaScript function that accepts props as an argument and returns JSX. Example:function Greeting({ name }) { return <h1>Hello, {name}</h1>; }
A class component is an ES6 class that extends React.Component and must implement a render() method. It can hold local state and use lifecycle methods:class App extends React.Component { render() { return <h1>Hello</h1>; } }