getDefaultProps

getDefaultProps

object getDefaultProps()

Invoked once and cached when the class is created. Values in the mapping will be set on this.props if that prop is not specified by the parent component (i.e. using an in check).

This method is invoked before any instances are created and thus cannot rely on this.props. In addition, be aware that any complex objects returned by getDefaultProps() will be shared across instances, not copied.

doc_React
2016-06-23 03:32:01
Comments
Leave a Comment

Please login to continue.