React · Junior · Question 63 of 75

What does <Button {...props} /> do?

Explanation

Spreading is convenient for wrappers, but forwards everything, including props the child doesn't expect. Prefer explicit props where possible.

Further reading

Problem with a question

React · Junior · question 63

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