4 ms·
That ~30 line component should be reduced to something resembling this: const PlanetView = ({planet}) => <div>{planet ? planet.stuff : 'Loading...'}</div>
by notaboutdave 9y ago
That ~30 line component should be reduced to something resembling this:
const PlanetView = ({planet}) => <div>{planet ? planet.stuff : 'Loading...'}</div>
- internet_rando 9y agosteve-carell-thank-you.gif
- always_good 9y agoIt's demonstrating a component that needs I/O, so I'm not sure how refactoring it into one that needs its parent to do the I/O helps the demonstration.