react-native-viewpager icon indicating copy to clipboard operation
react-native-viewpager copied to clipboard

How to receive props in renderPageIndicator

Open sriraman opened this issue 8 years ago • 0 comments

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,

sriraman avatar Aug 31 '16 09:08 sriraman