I currently have an Image wrapped inside of a TouchableOpacity tag. The image is of a sound icon, and when the user clicks it, I would like the icon to switch between the \"
I'm using the following way and its working fine.
class HomeScreen extends Component {
static navigationOptions = {
header: null,
};
constructor() {
super();
this.state = {
flagImage:true
};
}
render(){
let imageXml = ;
return (
);
}
}
changeImage() {
this.setState({
flagImage:!this.state.flagImage
});
}