I had setup a ViewPager component in my react-native application which goes like this:
render(){
return(
<View>
<ViewPager
ref="main"
dataSource={this.state.dataSource}
renderPage={this.renderView}
/>
<TouchableHighlight onPress={this._onPressButton}>
<Text>Something</Text>
</TouchableHighlight>
</View>
);
}
renderView(){
return(
<View ref="main1">
<Text>Something else</Text>
</View>
);
}
_onPressButton(){
//Do something with {this.refs.main} and {this.refs.main1}
}
Now I want to access the node handle of View with main1
reference. I can find the node handle of ViewPager
using findNodeHandle(this.refs.main)
but this.refs.main1
returns null. How can find this child View's node handle?