react native svg onpress
// just put the onPress prop, it works : )
Here is what the above code is Doing:
1. We are creating a function called myfnc.
2. We are passing the function to the onPress prop of the Svg component.
3. When the user presses the Svg component, the function will be called.