Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
notaboutdave
on Nov 10, 2017
|
parent
|
context
|
favorite
| on:
Simple React Patterns
That ~30 line component should be reduced to something resembling this:
const PlanetView = ({planet}) => <div>{planet ? planet.stuff : 'Loading...'}</div>
always_good
on Nov 10, 2017
[–]
It'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.
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: