Vue · Middle · Question 28 of 75

Why render a modal with <Teleport to="body">?

Explanation

Teleport changes only where the DOM goes; props, events and provide/inject still work as if the modal were in place.

Further reading

Problem with a question

Vue · Middle · question 28

Test yourself

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

Take this quiz