react-native-viewpager
react-native-viewpager copied to clipboard
How to receive props in renderPageIndicator
In renderPage, I'm receiving the data as parameter. But, I couldn't receive the scrollValues in renderPageIndicator. I know that there is some way to get that. But I couldn't figure out a way to do it.
_renderPageIndicator () {
return <PageIndicator />
}
class PageIndicator extends Component {
constructor (props) {
super(props)
}
componentWillReceiveProps (nextProps) {
console.log(nextProps.scrollValue) // Is it possible to get the value here?
}
render () {
return <View></View>
}
}
Thanks in advance,