reboottime / React-Develpment

Some notes, thought, articles or source code readings aggregated here about React Web development.
0 stars 0 forks source link

[Advanced React] Render Props application #75

Open reboottime opened 4 months ago

reboottime commented 4 months ago

Render Props application

This article is a note of Render props - Advanced React course, Episode 4

Major Content

reboottime commented 4 months ago

The problem and Solution

Take the button component in previous lecture as an example, where the <Icon /> component may control its size using the font-size prop. For example:

<Icon fontSize="16" />
image
reboottime commented 4 months ago

Why we still need it in these days?

image