React · Junior · Question 66 of 75

How does React recommend reusing UI between components?

Explanation

Components that accept children or "slot" props (header, footer) are flexible without inheritance hierarchies. Shared logic goes into custom hooks.

Further reading

Problem with a question

React · Junior · question 66

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