Tyler Hawkins
Apr 20, 2021

--

Absolutely, great callout. My intent with this example was just to show the difference between providing a truthy value `isHungry` and a falsy value `isHungry={false}` as a prop, so that's why it was written the way it was. But yes, you are absolutely correct, and this would be a great use case for using a default value.

--

--

Tyler Hawkins
Tyler Hawkins

Written by Tyler Hawkins

Staff software engineer. Continuous learner. Educator. http://tylerhawkins.info

No responses yet