React · Senior · Question 71 of 75

Why is storing JSX elements in state usually a bad idea?

Explanation

Data in state plus rendering from it keeps the UI consistent with the latest props and context. Elements in state also complicate serialization and debugging.

Further reading

Problem with a question

React · Senior · question 71

Test yourself

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

Take this quiz