React · Junior · Question 40 of 75

What is a "pure" component in React terms?

Explanation

Rendering must be a pure computation: no mutating external variables, no requests, no DOM changes. Side effects belong in event handlers or useEffect. StrictMode, concurrent rendering and the React Compiler rely on purity.

Further reading

Problem with a question

React · Junior · question 40

Test yourself

Take the React · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz