Skip to content

Comments #9

@dansjensen

Description

@dansjensen

Why not use https://facebook.github.io/react-native/docs/touchableopacity.html#touchableopacity
instead of:

const TouchableElement = Platform.OS === 'android' ?
      TouchableNativeFeedback :
      TouchableHighlight;

Don't you get warnings about missing key?

renderRow={(comment) => <Comment {...comment} />}

Do you normally have actions in Constructor?

constructor(props) {
    super(props);
    const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });
    this.state = { dataSource: ds.cloneWithRows(this.props.comments) };
    this.props.actions.fetchComments();
  }

I would define dataSource in state like this:

this.state = { dataSource: new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }) };

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions