Skip to content

Instantly share code, notes, and snippets.

@StevenJL
Created October 1, 2018 03:18
Show Gist options
  • Save StevenJL/4fd25012d52846b3bdca93cf6b42aecd to your computer and use it in GitHub Desktop.
Save StevenJL/4fd25012d52846b3bdca93cf6b42aecd to your computer and use it in GitHub Desktop.
import PropTypes from 'prop-types';
Widget.propTypes = {
extraArray: PropTypes.array.isRequired,
userNames: PropTyes.arrayOf(PropTypes.string).isRequired,
userPosts: PropTypes.arrayOf(PropTypes.shape({
id: PropTypes.number.isRequired,
title: PropTypes.string.isRequired,
body: PropTypes.string.isRequired,
postDate: PropTypes.instanceOf(Date).isRequired
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment