Design Patterns · Junior · Question 51 of 75

What is the render props pattern?

<MouseTracker render={({ x, y }) => <Cursor x={x} y={y} />} />

Explanation

Custom hooks replaced most render props, but the pattern is still used where a component must control rendering, e.g. virtualized lists.

Further reading

Problem with a question

Design Patterns · Junior · question 51

Test yourself

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

Take this quiz