Created
October 26, 2017 12:34
-
-
Save coryhouse/722c908babb73fb4462e43ff9846d980 to your computer and use it in GitHub Desktop.
Example of consuming a centralized propType
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import {Customer} from '../../../propTypes'; | |
function CustomerInfo({customer}) { | |
return ( | |
<div>{customer.firstName}</div> | |
); | |
} | |
CustomerInfo.propTypes = { | |
customer: Customer.isRequired, | |
}; | |
export default CustomerInformationContainer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment