Description
My project is a web application.
I use onClick for Svg icons in my app and it worked on 14.1.0, but when i upgraded to 15.12 the onClick callback never gets triggered when i click the Svg (web). Changing it to onPress fixes the issue, and now i know that onClick is not idiomatic for react-native libs, but:
- I would expect onClick to be also respected in web environment
- if this is the intended behavior, the component should now allow
onClick and there should be type errors
If i understood correctly this is introduced in 15.5 (issue not present in 15.4).
Steps to reproduce
- usereact-native-svg version 15.5 or later
- Create Svg with onClick property
- That onClick is not respected and there are no type errors
Snack or a link to a repository
https://snack.expo.dev/@jiojosbg/isnored-onclick-15-5-0
SVG version
15.12.0
React Native version
0.81.5
Platforms
Web
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
Description
My project is a web application.
I use
onClickfor Svg icons in my app and it worked on 14.1.0, but when i upgraded to 15.12 theonClickcallback never gets triggered when i click the Svg (web). Changing it toonPressfixes the issue, and now i know thatonClickis not idiomatic for react-native libs, but:onClickand there should be type errorsIf i understood correctly this is introduced in 15.5 (issue not present in 15.4).
Steps to reproduce
Snack or a link to a repository
https://snack.expo.dev/@jiojosbg/isnored-onclick-15-5-0
SVG version
15.12.0
React Native version
0.81.5
Platforms
Web
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes