{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/6357","repository_url":"https://api.github.com/repos/facebook/react","labels_url":"https://api.github.com/repos/facebook/react/issues/6357/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/6357/comments","events_url":"https://api.github.com/repos/facebook/react/issues/6357/events","html_url":"https://github.com/facebook/react/pull/6357","id":143801468,"number":6357,"title":"Proposal: isDeprecated option for PropTypes","user":{"login":"pavelkornev","id":748043,"avatar_url":"https://avatars.githubusercontent.com/u/748043?v=3","gravatar_id":"","url":"https://api.github.com/users/pavelkornev","html_url":"https://github.com/pavelkornev","followers_url":"https://api.github.com/users/pavelkornev/followers","following_url":"https://api.github.com/users/pavelkornev/following{/other_user}","gists_url":"https://api.github.com/users/pavelkornev/gists{/gist_id}","starred_url":"https://api.github.com/users/pavelkornev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavelkornev/subscriptions","organizations_url":"https://api.github.com/users/pavelkornev/orgs","repos_url":"https://api.github.com/users/pavelkornev/repos","events_url":"https://api.github.com/users/pavelkornev/events{/privacy}","received_events_url":"https://api.github.com/users/pavelkornev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-27T11:44:31Z","updated_at":"2016-03-28T08:35:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react/pulls/6357","html_url":"https://github.com/facebook/react/pull/6357","diff_url":"https://github.com/facebook/react/pull/6357.diff","patch_url":"https://github.com/facebook/react/pull/6357.patch"},"body":"During lifetime some of the components props became deprecated. It would be nice to have a way to indicate these props in declarative way.\r\n\r\n1. It has no conflicts with ```isRequired``` flag and can not be combined together since it makes no sense to require deprecated props.\r\n\r\n2. It has full backward compatibility and will not break all existed components.\r\n\r\nExamples of usage:\r\n```\r\npropTypes: {\r\n  primitive: PropTypes.string.isDeprecated\r\n  array: PropTypes.arrayOf(PropTypes.number).isDeprecated\r\n  complex: PropTypes.oneOfType([PropTypes.string.isDeprecated, PropTypes.number]),\r\n  shape: PropTypes.shape({\r\n    key: PropTypes.oneOfType([PropTypes.string.isDeprecated, PropTypes.number])\r\n  }).isDeprecated\r\n}\r\n```\r\n\r\nAs a result it will warn in console with the following message:\r\n```\r\nDeprecated prop `primitive` was specified in `MyComponent`.\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/202300506","html_url":"https://github.com/facebook/react/pull/6357#issuecomment-202300506","issue_url":"https://api.github.com/repos/facebook/react/issues/6357","id":202300506,"user":{"login":"facebook-github-bot","id":6422482,"avatar_url":"https://avatars.githubusercontent.com/u/6422482?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2016-03-28T08:35:09Z","updated_at":"2016-03-28T08:35:09Z","body":"@pavelkornev updated the pull request."}}