class CreateTS extends Component {
constructor(props) {
super(props);
this.state = {
project: 'Select Project',
activity: 'Select Activity',
hour: '',
task: '',
timesheet: [],
dataSource: []
};
const ds = new ListView.DataSource({
rowHasChanged: (r1, r2) => r1 !== r2
});
this.state.dataSource = ds.cloneWithRows(this.state.timesheet);
console.log('Here at constructo!');
}
onAddTSPress() {
const { project, activity, task, hour } = this.state;
console.log(project);
console.log(activity);
console.log(task);
console.log(hour);
this.setState({
timesheet: this.state.timesheet.push(project)
});
console.log('Here button press!');
const ds = new ListView.DataSource({
rowHasChanged: (r1, r2) => r1 !== r2
});
this.dataSource = ds.cloneWithRows(this.state.timesheet);
}
renderRow(data) {
console.log('Here at render row!');
console.log(`${data} $""`);
return <Text> {data} </Text>;
}
render() {
return(
Some input components that set state of project and activity with
values...
A button that call onAddTSPress function.
And a listview in which items will be add that we created above
);
}
After running above code and add one item i got following screen which is expected behavior.

But when i try to add another item in list i got following error. What is the issue? 
it saying push is not a function while first time it run successfully as expected. But second time it gives error and i am unable to add second item in list.
Here is my updated onAddTSPress function
//Modified onAddTSPress function
onAddTSPress() {
const { project, activity, task, hour } = this.state;
console.log(project);
console.log(activity);
console.log(task);
console.log(hour);
console.log(`${this.state.timesheet}`);
this.setState({
timesheet: [...this.state.timesheet, project]
});
console.log('Here button press!');
console.log(`${this.state.timesheet}`);
this.setState({ dataSource:
this.state.dataSource.cloneWithRows(this.state.timesheet) });
}
return (
<Button
onPress={this.onAddTSPress.bind(this)}
btnStyle={styles.btnStyle}
txtStyle={styles.txtStyle}
>
Add
</Button>
<ListView
style={styles.listViewContianer}
dataSource={this.state.dataSource}
renderRow={this.renderRow}
enableEmptySections
/>
);