Updates from Mon 23 Mar

- [React Native] Fix iOS 7 crashes b/c missing Photos.fmwk | Alex Akers
- UIExplorer flowification | Basil Hosmer
- Add clearImmediate module | Marshall Roch
- [ReactNative] Print directories packager is serving files from | Alex Kotliarskyi
- Work around flow bug with exports | Marshall Roch
- [ReactNative] Move packager/init.sh to GitHub | Alex Kotliarskyi
- [ReactNative] Remove react-native/package.json | Christopher Chedeau
- [ReactNative] Returning actual contentSize for RCTScrollViewManager | Henry Lung
This commit is contained in:
Christopher Chedeau
2015-03-23 10:06:16 -07:00
parent a738b49ae2
commit 82461e04ab
33 changed files with 112 additions and 96 deletions

View File

@@ -1,5 +1,6 @@
/**
* Copyright 2004-present Facebook. All Rights Reserved.
* @flow
*/
'use strict';
@@ -28,6 +29,8 @@ var ListViewSimpleExample = React.createClass({
};
},
_pressData: ({}: {[key: number]: boolean}),
componentWillMount: function() {
this._pressData = {};
},
@@ -46,7 +49,7 @@ var ListViewSimpleExample = React.createClass({
);
},
_renderRow: function(rowData, sectionID, rowID) {
_renderRow: function(rowData: string, sectionID: number, rowID: number) {
var rowHash = Math.abs(hashCode(rowData));
var imgSource = {
uri: THUMB_URLS[rowHash % THUMB_URLS.length],
@@ -66,7 +69,7 @@ var ListViewSimpleExample = React.createClass({
);
},
_genRows: function(pressData) {
_genRows: function(pressData: {[key: number]: boolean}): Array<string> {
var dataBlob = [];
for (var ii = 0; ii < 100; ii++) {
var pressedText = pressData[ii] ? ' (pressed)' : '';
@@ -75,7 +78,7 @@ var ListViewSimpleExample = React.createClass({
return dataBlob;
},
_pressRow: function(rowID) {
_pressRow: function(rowID: number) {
this._pressData[rowID] = !this._pressData[rowID];
this.setState({dataSource: this.state.dataSource.cloneWithRows(
this._genRows(this._pressData)