I have a modal screen component in the renderCard prop for my Swiper component. I want to change the 'isVisible' state of that modal using the onTapCard prop of the Swiper component. The Swiper component with the Modal component is shown below where 'pictures' is the input data array in state. Any help would be appreciated.
I have a modal screen component in the renderCard prop for my Swiper component. I want to change the 'isVisible' state of that modal using the onTapCard prop of the Swiper component. The Swiper component with the Modal component is shown below where 'pictures' is the input data array in state. Any help would be appreciated.
HomeScreen extends Component { constructor (props) { super(props) this.state = { isVisible: false, currentPic: null, pictures: [... ], }; this.setCurrentPic = this.setCurrentPic.bind(this); };
setCurrentPic(id) { this.setState({currentPic: id}); }
onSwiped = (type) => { console.log(
${type}
) };swipeLeft = () => { this.swiper.swipeLeft() };
render () { return (