React · Senior · Question 65 of 75

Where does React (17+) attach its event listeners?

Explanation

Attaching to the root made it possible to run several React versions or apps on one page, and e.stopPropagation() now also stops bubbling to native document listeners.

Further reading

Problem with a question

React · Senior · question 65

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