Skip to content

Instantly share code, notes, and snippets.

@coryhouse
Created October 26, 2017 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coryhouse/722c908babb73fb4462e43ff9846d980 to your computer and use it in GitHub Desktop.
Save coryhouse/722c908babb73fb4462e43ff9846d980 to your computer and use it in GitHub Desktop.
Example of consuming a centralized propType
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