Skip to content

Instantly share code, notes, and snippets.

@coryhouse
Last active July 1, 2018 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save coryhouse/a07d894735216cbbc989100fe79e1779 to your computer and use it in GitHub Desktop.
Save coryhouse/a07d894735216cbbc989100fe79e1779 to your computer and use it in GitHub Desktop.
UserDetails component consuming a centralized PropType
import React from 'react';
import {userType} from './types';
function User({ user }) {
return (
<div>
<h1>{user.firstName} {user.lastName}</h1>
</div>
)
}
User.propTypes = {
user: userType.isRequired
};
export default User;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment