The problem
I am exporting my components to another project and Touchable is not working in react-native-web components. In the project when I am trying to use the components the click event is not working. I imported the components and those has a onClick method.
How to reproduce
Simplified test case:
Create a component a link that project.
Then in your web project link the library and use it.
Expected behavior
That the click event works as expected.
Environment (include versions). Did this work in previous versions?
Any idea @necolas ?
onClick prop for touchable. Please refer to the docs.Thanks for taking the time to answer me. I am just creating a library and then linked and create another app and exporting and using it. I am using React 16.3.2 and React Native version 0.53.3
I was meant to onPress not onClick.
i have the same issue,
i have my components library which are imported into a nextjs project, in this project i am not able to handle onPress events, only into Text components.
Thanks :)
Make sure you're using the latest version of react and react native web. If you still have a problem open a new issue with all the information requested
Most helpful comment
Thanks for taking the time to answer me. I am just creating a library and then linked and create another app and exporting and using it. I am using React 16.3.2 and React Native version 0.53.3
I was meant to
onPressnotonClick.