0
Challenge · 08React Core
Default Props / Parameters
Coreused in ~70% of apps
Handle missing data gracefully — with plain JavaScript, not a deprecated React API.
Core idea. Give props default values using JS default parameters in the destructure; don't use the deprecated defaultProps on function components.
poke it, drag it,
try to break it
try to break it
no slides here.
you drive.
you drive.
Playground, this isn't a screenshot
Live demointeractive
AM? The third
<Avatar /> has no props — it falls back to the defaults.↑ play a little first, then dig in