React · Junior · Question 56 of 75

How do you write a comment inside JSX markup?

Explanation

Inside JSX you are in markup mode, so the comment has to be a JavaScript expression in braces. HTML comments are rendered as text or cause errors.

Further reading

Problem with a question

React · Junior · question 56

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