Skip to content
card background pattern
Level 1

React For Everyone

Unlock Full Course

$49.99 $39.99



Default Props

Now that we understand how props work, we will take a look at default props. Default props are a default value that we can give our props in case a value is not given.



User photo avatar
6 days ago

I had the same experience. Cheers! Read about it:

9 days ago

Just had the same issue, and should have read the comments 🤦‍♂️

User photo avatar
London Dirt
12 days ago

@Aaron/Epic Nice ^^ I should always check lesson comments before staring puzzlingly at two lines of code for 10 minutes haha

User photo avatar
20 days ago

If anyone else has issues with the PropTypes, it's because it has moved to it's own package.

Do this instead: remove the { PropTypes } from the React import line and add, import PropTypes from 'prop-types';

Everything else stays the same.

Something to say?

Become a Pro