I am using React Native with Expo and I have 4 SVG elements that I need them to be clickable. This is the code for each of these:
<Svg.G
id="Passangers-Going-B"
onPress={() => console.log(`${cardinalPoint} Avatar Was Clicked`)}
>
...
With that code I am able to click on the SVG element but the weird thing is that when I try to click on another element the click is still firing the event for the last element I clicked on.
I recorded a video with the behavior
So, is there a better way to do this? All I need is to click on those SVG elements in order to change to a new route.
Any ideas?
I am using SVG from expo. import { Svg } from 'expo';
→ Svg - Expo Documentation