{"action":"closed","number":5390,"pull_request":{"url":"https://api.github.com/repos/facebook/react/pulls/5390","id":49741192,"html_url":"https://github.com/facebook/react/pull/5390","diff_url":"https://github.com/facebook/react/pull/5390.diff","patch_url":"https://github.com/facebook/react/pull/5390.patch","issue_url":"https://api.github.com/repos/facebook/react/issues/5390","number":5390,"state":"closed","locked":false,"title":"Add validation for arrayOf and objectOf in ReactPropTypes","user":{"login":"chicoxyzzy","id":1507086,"avatar_url":"https://avatars.githubusercontent.com/u/1507086?v=3","gravatar_id":"","url":"https://api.github.com/users/chicoxyzzy","html_url":"https://github.com/chicoxyzzy","followers_url":"https://api.github.com/users/chicoxyzzy/followers","following_url":"https://api.github.com/users/chicoxyzzy/following{/other_user}","gists_url":"https://api.github.com/users/chicoxyzzy/gists{/gist_id}","starred_url":"https://api.github.com/users/chicoxyzzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chicoxyzzy/subscriptions","organizations_url":"https://api.github.com/users/chicoxyzzy/orgs","repos_url":"https://api.github.com/users/chicoxyzzy/repos","events_url":"https://api.github.com/users/chicoxyzzy/events{/privacy}","received_events_url":"https://api.github.com/users/chicoxyzzy/received_events","type":"User","site_admin":false},"body":"```javascript\r\n  static propTypes = {\r\n    instrument: PropTypes.object.isRequired,\r\n    data: PropTypes.arrayOf({\r\n      timestamp: PropTypes.object.isRequired,\r\n      value: PropTypes.number.isRequired,\r\n    }).isRequired,\r\n    height: PropTypes.number.isRequired,\r\n    width: PropTypes.number.isRequired,\r\n  };\r\n```\r\nNotice data property. it should look like\r\n```javascript\r\n    data: PropTypes.arrayOf(PropTypes.shape({\r\n      timestamp: PropTypes.object.isRequired,\r\n      value: PropTypes.number.isRequired,\r\n    })).isRequired,\r\n```\r\ninstead.\r\n\r\nThis is one of common mistakes. But error message is very cryptic:\r\n`Warning: Failed propType: typeChecker is not a function Check the render method of 'ChartPanel'.`\r\n\r\nSo I wrote some tests and pretty error messages.\r\n\r\nnow error looks like this\r\n`Warning: Failed propType: Invalid prop 'data' supplied to 'ChartContainer', expected valid PropType. Check the render method of 'ChartPanel'.`\r\n\r\n\r\nThis is kind of same as #3963 but for arrayOf and objectOf proptypes","created_at":"2015-11-04T20:31:34Z","updated_at":"2015-11-12T00:48:33Z","closed_at":"2015-11-12T00:48:33Z","merged_at":"2015-11-12T00:48:33Z","merge_commit_sha":"ccf8dbd4392fbabe360468616bd17a87d05caa4b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react/pulls/5390/commits","review_comments_url":"https://api.github.com/repos/facebook/react/pulls/5390/comments","review_comment_url":"https://api.github.com/repos/facebook/react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react/issues/5390/comments","statuses_url":"https://api.github.com/repos/facebook/react/statuses/a86d25d584d085aef7d70bec2779accd12fd7db9","head":{"label":"chicoxyzzy:arrayof-objectof-tests","ref":"arrayof-objectof-tests","sha":"a86d25d584d085aef7d70bec2779accd12fd7db9","user":{"login":"chicoxyzzy","id":1507086,"avatar_url":"https://avatars.githubusercontent.com/u/1507086?v=3","gravatar_id":"","url":"https://api.github.com/users/chicoxyzzy","html_url":"https://github.com/chicoxyzzy","followers_url":"https://api.github.com/users/chicoxyzzy/followers","following_url":"https://api.github.com/users/chicoxyzzy/following{/other_user}","gists_url":"https://api.github.com/users/chicoxyzzy/gists{/gist_id}","starred_url":"https://api.github.com/users/chicoxyzzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chicoxyzzy/subscriptions","organizations_url":"https://api.github.com/users/chicoxyzzy/orgs","repos_url":"https://api.github.com/users/chicoxyzzy/repos","events_url":"https://api.github.com/users/chicoxyzzy/events{/privacy}","received_events_url":"https://api.github.com/users/chicoxyzzy/received_events","type":"User","site_admin":false},"repo":{"id":29316589,"name":"react","full_name":"chicoxyzzy/react","owner":{"login":"chicoxyzzy","id":1507086,"avatar_url":"https://avatars.githubusercontent.com/u/1507086?v=3","gravatar_id":"","url":"https://api.github.com/users/chicoxyzzy","html_url":"https://github.com/chicoxyzzy","followers_url":"https://api.github.com/users/chicoxyzzy/followers","following_url":"https://api.github.com/users/chicoxyzzy/following{/other_user}","gists_url":"https://api.github.com/users/chicoxyzzy/gists{/gist_id}","starred_url":"https://api.github.com/users/chicoxyzzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chicoxyzzy/subscriptions","organizations_url":"https://api.github.com/users/chicoxyzzy/orgs","repos_url":"https://api.github.com/users/chicoxyzzy/repos","events_url":"https://api.github.com/users/chicoxyzzy/events{/privacy}","received_events_url":"https://api.github.com/users/chicoxyzzy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chicoxyzzy/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":true,"url":"https://api.github.com/repos/chicoxyzzy/react","forks_url":"https://api.github.com/repos/chicoxyzzy/react/forks","keys_url":"https://api.github.com/repos/chicoxyzzy/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chicoxyzzy/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chicoxyzzy/react/teams","hooks_url":"https://api.github.com/repos/chicoxyzzy/react/hooks","issue_events_url":"https://api.github.com/repos/chicoxyzzy/react/issues/events{/number}","events_url":"https://api.github.com/repos/chicoxyzzy/react/events","assignees_url":"https://api.github.com/repos/chicoxyzzy/react/assignees{/user}","branches_url":"https://api.github.com/repos/chicoxyzzy/react/branches{/branch}","tags_url":"https://api.github.com/repos/chicoxyzzy/react/tags","blobs_url":"https://api.github.com/repos/chicoxyzzy/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chicoxyzzy/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chicoxyzzy/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/chicoxyzzy/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chicoxyzzy/react/statuses/{sha}","languages_url":"https://api.github.com/repos/chicoxyzzy/react/languages","stargazers_url":"https://api.github.com/repos/chicoxyzzy/react/stargazers","contributors_url":"https://api.github.com/repos/chicoxyzzy/react/contributors","subscribers_url":"https://api.github.com/repos/chicoxyzzy/react/subscribers","subscription_url":"https://api.github.com/repos/chicoxyzzy/react/subscription","commits_url":"https://api.github.com/repos/chicoxyzzy/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/chicoxyzzy/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/chicoxyzzy/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/chicoxyzzy/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/chicoxyzzy/react/contents/{+path}","compare_url":"https://api.github.com/repos/chicoxyzzy/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chicoxyzzy/react/merges","archive_url":"https://api.github.com/repos/chicoxyzzy/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chicoxyzzy/react/downloads","issues_url":"https://api.github.com/repos/chicoxyzzy/react/issues{/number}","pulls_url":"https://api.github.com/repos/chicoxyzzy/react/pulls{/number}","milestones_url":"https://api.github.com/repos/chicoxyzzy/react/milestones{/number}","notifications_url":"https://api.github.com/repos/chicoxyzzy/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chicoxyzzy/react/labels{/name}","releases_url":"https://api.github.com/repos/chicoxyzzy/react/releases{/id}","created_at":"2015-01-15T20:26:12Z","updated_at":"2015-05-04T22:15:14Z","pushed_at":"2015-11-05T03:12:40Z","git_url":"git://github.com/chicoxyzzy/react.git","ssh_url":"git@github.com:chicoxyzzy/react.git","clone_url":"https://github.com/chicoxyzzy/react.git","svn_url":"https://github.com/chicoxyzzy/react","homepage":"http://facebook.github.io/react/","size":59279,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"0.3-stable"}},"base":{"label":"facebook:master","ref":"master","sha":"9b7cc43330187917e2579d2b57196a80e147a129","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":10270250,"name":"react","full_name":"facebook/react","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":false,"url":"https://api.github.com/repos/facebook/react","forks_url":"https://api.github.com/repos/facebook/react/forks","keys_url":"https://api.github.com/repos/facebook/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react/teams","hooks_url":"https://api.github.com/repos/facebook/react/hooks","issue_events_url":"https://api.github.com/repos/facebook/react/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react/events","assignees_url":"https://api.github.com/repos/facebook/react/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react/tags","blobs_url":"https://api.github.com/repos/facebook/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react/languages","stargazers_url":"https://api.github.com/repos/facebook/react/stargazers","contributors_url":"https://api.github.com/repos/facebook/react/contributors","subscribers_url":"https://api.github.com/repos/facebook/react/subscribers","subscription_url":"https://api.github.com/repos/facebook/react/subscription","commits_url":"https://api.github.com/repos/facebook/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react/merges","archive_url":"https://api.github.com/repos/facebook/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react/downloads","issues_url":"https://api.github.com/repos/facebook/react/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react/releases{/id}","created_at":"2013-05-24T16:15:54Z","updated_at":"2015-11-11T22:30:01Z","pushed_at":"2015-11-12T00:48:33Z","git_url":"git://github.com/facebook/react.git","ssh_url":"git@github.com:facebook/react.git","clone_url":"https://github.com/facebook/react.git","svn_url":"https://github.com/facebook/react","homepage":"https://facebook.github.io/react/","size":122452,"stargazers_count":31129,"watchers_count":31129,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4881,"mirror_url":null,"open_issues_count":568,"forks":4881,"open_issues":568,"watchers":31129,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/5390"},"html":{"href":"https://github.com/facebook/react/pull/5390"},"issue":{"href":"https://api.github.com/repos/facebook/react/issues/5390"},"comments":{"href":"https://api.github.com/repos/facebook/react/issues/5390/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react/pulls/5390/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react/pulls/5390/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react/statuses/a86d25d584d085aef7d70bec2779accd12fd7db9"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"zpao","id":8445,"avatar_url":"https://avatars.githubusercontent.com/u/8445?v=3","gravatar_id":"","url":"https://api.github.com/users/zpao","html_url":"https://github.com/zpao","followers_url":"https://api.github.com/users/zpao/followers","following_url":"https://api.github.com/users/zpao/following{/other_user}","gists_url":"https://api.github.com/users/zpao/gists{/gist_id}","starred_url":"https://api.github.com/users/zpao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zpao/subscriptions","organizations_url":"https://api.github.com/users/zpao/orgs","repos_url":"https://api.github.com/users/zpao/repos","events_url":"https://api.github.com/users/zpao/events{/privacy}","received_events_url":"https://api.github.com/users/zpao/received_events","type":"User","site_admin":false},"comments":3,"review_comments":2,"commits":2,"additions":26,"deletions":0,"changed_files":2}}