I'm newbie to React Native and having this problem when I was trying to build an iPhone application.
My code is like:
var React = require('react-native');
var MyListView = require('./MyListView'); // which renders a <ListView>...</ListView>
var SearchPage = React.createClass({
onSubmitEditing: function () { /* do something */ },
render: function() {
return (
<ScrollView>
<TextInput onSubmitEditing={this.onSubmitEditing} />
<MyListView />
</ScrollView>
)
},
})
And I need to change the state of MyListView (update data source), when searching (onSubmitEditingevent). How should I do that? I thought there may be some solutions if I can use <MyListView /> as a JavaScript object, which I don't know how.
Any helps will be appreciate! Thanks in advance!