React-Native-ViewPager
React-Native-ViewPager copied to clipboard
Ref doesn't not callback
Hi, thanks for the library. I have some trouble when I use ref like this.
According to Refs and the DOM
<View style = {styles.container}>
<IndicatorViewPager
style={{flex:1, flexDirection: 'column-reverse'}}
pagerStyle = {{flex: 1}}
indicator={this._renderTitleIndicator()}
>
<View>
<Text ref = {ref => ref => console.log('ref is ', ref)}>page one</Text>
</View>
<View>
<Text>page two</Text>
</View>
</IndicatorViewPager>
</View>
There is no log in console.
However, it works when I remove IndicatorViewPager like this
<View style = {styles.container}>
<View>
<Text ref = {ref => ref => console.log('ref is ', ref)}>page one</Text>
</View>
<View>
<Text>page two</Text>
</View>
</View>
So what should I do?