ascoders / react-native-image-viewer

🚀 tiny & fast lib for react native image viewer pan and zoom
MIT License
2.44k stars 576 forks source link

Help with renderHeader/Footer props not showing anything #481

Open dlujan opened 2 years ago

dlujan commented 2 years ago

I can't figure out how to use renderHeader and renderFooter. There's no example anywhere of this.

I'm putting these props inside ImageViewer but nothing new is showing. What do I need to fix?

renderHeader={(imageIndex) => <View><Text>asdfd</Text></View>} renderFooter={(imageIndex) => <View><Text>asdfd</Text></View>}

wasupak commented 2 years ago

Try this

renderHeader={(index) => (<Text}>Header)}