-
Notifications
You must be signed in to change notification settings - Fork 25k
Description
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
It seems that flow is not properly checking propTypes of react-native components for a new project created with react-native init.
If I modify index.ios.js to have an invalid property on one of the components, for example:
<View style={styles.container} accessible='123'>
(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.
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.
I 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.