[fix] Flow type checking and annotations

Fixes dozens of Flow errors; adds type annotations; marks more files for
Flow type checking. Fixes a bug in 'AppState'.

15 Flow errors remaining. Several React Native files are still not type
checked (e.g., PanResponder, Touchables)

Ref #465
This commit is contained in:
Nicolas Gallagher
2017-05-27 10:43:04 -07:00
parent edef737249
commit bcdeda5dab
40 changed files with 212 additions and 52 deletions
+6 -2
View File
@@ -188,7 +188,7 @@ const GameEndOverlay = createReactClass({
const TicTacToeApp = createReactClass({
getInitialState() {
return { board: new Board(), player: 1 }
return { board: new Board(), player: 1 };
},
restartGame() {
@@ -214,7 +214,11 @@ const TicTacToeApp = createReactClass({
const rows = this.state.board.grid.map((cells, row) => (
<View key={'row' + row} style={styles.row}>
{cells.map((player, col) => (
<Cell key={'cell' + col} onPress={this.handleCellPress.bind(this, row, col)} player={player} />
<Cell
key={'cell' + col}
onPress={this.handleCellPress.bind(this, row, col)}
player={player}
/>
))}
</View>
));