{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/8357","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/8357/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/8357/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/8357/events","html_url":"https://github.com/facebook/react-native/issues/8357","id":161932969,"number":8357,"title":"flow not checking propTypes for newly created \"react-native init\" project","user":{"login":"tomduncalf","id":5458070,"avatar_url":"https://avatars.githubusercontent.com/u/5458070?v=3","gravatar_id":"","url":"https://api.github.com/users/tomduncalf","html_url":"https://github.com/tomduncalf","followers_url":"https://api.github.com/users/tomduncalf/followers","following_url":"https://api.github.com/users/tomduncalf/following{/other_user}","gists_url":"https://api.github.com/users/tomduncalf/gists{/gist_id}","starred_url":"https://api.github.com/users/tomduncalf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomduncalf/subscriptions","organizations_url":"https://api.github.com/users/tomduncalf/orgs","repos_url":"https://api.github.com/users/tomduncalf/repos","events_url":"https://api.github.com/users/tomduncalf/events{/privacy}","received_events_url":"https://api.github.com/users/tomduncalf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-23T14:12:15Z","updated_at":"2016-06-25T21:15:47Z","closed_at":null,"body":"Setup: OS X El Capitan, Flow: 0.26, react-native-cli: 1.0.0, react-native: 0.23.1, Atom: 1.8.0, Nuclide: 0.146.0\r\n\r\nIt seems that `flow` is not properly checking propTypes of react-native components for a new project created with `react-native init`.\r\n\r\nIf I modify `index.ios.js` to have an invalid property on one of the components, for example:\r\n\r\n```\r\n<View style={styles.container} accessible='123'>\r\n```\r\n\r\n(where accessible should be `PropTypes.bool`), I get no error either in Nuclide or when running `flow`. I also get no autocompletion of props in Nuclide.\r\n\r\n`flow` is doing something, however, as if I write a plain function e.g. `function test(a: string)` and try and call it with the wrong type e.g. `test(3)`, I do get an error in both `flow` and Nuclide.\r\n\r\nI have the same problem with this starter kit repo: https://github.com/jhabdas/react-native-webpack-starter-kit but interestingly, not with the F8App from https://github.com/fbsamples/f8app – with the later, autocomplete and propType checking acts like I would expect it to."},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/228570850","html_url":"https://github.com/facebook/react-native/issues/8357#issuecomment-228570850","issue_url":"https://api.github.com/repos/facebook/react-native/issues/8357","id":228570850,"user":{"login":"dleen","id":1297964,"avatar_url":"https://avatars.githubusercontent.com/u/1297964?v=3","gravatar_id":"","url":"https://api.github.com/users/dleen","html_url":"https://github.com/dleen","followers_url":"https://api.github.com/users/dleen/followers","following_url":"https://api.github.com/users/dleen/following{/other_user}","gists_url":"https://api.github.com/users/dleen/gists{/gist_id}","starred_url":"https://api.github.com/users/dleen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dleen/subscriptions","organizations_url":"https://api.github.com/users/dleen/orgs","repos_url":"https://api.github.com/users/dleen/repos","events_url":"https://api.github.com/users/dleen/events{/privacy}","received_events_url":"https://api.github.com/users/dleen/received_events","type":"User","site_admin":false},"created_at":"2016-06-25T21:15:47Z","updated_at":"2016-06-25T21:15:47Z","body":"I get the same issue when importing ```View``` from the usual location:\r\n```import { View } from 'react-native';```\r\n\r\nNo error is shown when making the same type error as described in the issue above. However when importing directly from the file ```node_modules/react-native/Libraries/Components/View/View.js``` i.e.\r\n\r\n```import View from 'react-native/Libraries/Components/View/View'```\r\n\r\nI get the correct error:\r\n\r\n```\r\nsrc/components/Home.js:22\r\n 22:   <View style={styles.container} accessible='123'>\r\n       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ React element `View`\r\n 22:   <View style={styles.container} accessible='123'>\r\n                                                 ^^^^^ string. This type is incompatible with\r\n109:     accessible: PropTypes.bool,\r\n                     ^^^^^^^^^^^^^^ boolean. See: node_modules/react-native/Libraries/Components/View/View.js:109\r\n```\r\n\r\nSo something is getting list along the way. I'll try take a deeper look.\r\n"}}
{"actor":{"display_login":"dleen"}}