What are default props?
- Props that are set by the parent component
- Props that are passed to the component through the URL
- Props that are assigned default values
- Props that are passed to the component through a global store
Default props are props that are assigned default values in a React component. These default values are used if the prop is not passed to the component from the parent or if it is passed as undefined. Default props are defined using the defaultProps property on the component class.
Loading...