-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onPress not working on web #1483
Comments
Any suggestions on how to fix/patch Warning: Unknown event handler property |
@mehimanshupatil I'm using react-native-web 0.13.18 and I was able to get all of these props to work:
Specifically I used them on a |
Hello, @rsml |
I second this. We might approach it with the following mapping:
What are your thoughts? I was wondering about these, because I thought How can we marry react-native-svg off to their mappings? I would make no sense to reimplement those...? |
i have the same issue and a easy workaround until it is fixed:
.babelrc {
"presets": ["react"],
"plugins": [
[
"rename-jsx-attribute",
{
"attributes": {
"onPress": "onClick"
}
}
]
]
}
|
I solved this problem by explicitly declaring onPress and onClick methods at the same time |
Hi, sorry for such a simple question, but how are you make onClick prop (and others web props) work on Rect, because onClick does not even exist in available props for Rect for me (there are only native events props, such as onPress, onPressIn, etc.)? |
|
Hi, I encounter the same error using an icon wrapped inside Hope it will help some of you |
Hello, this works perfectly, however I only require the onClick on SVG related libraries. Do you know if there is anyway to specify? |
One workaround is to declare a type merging.
cc: @ThePVY |
Is this related? akveo/react-native-ui-kitten#1801 |
Still an issue: Warning: Unknown event handler property Anybody found a workaround? Any plan on getting this fixed? |
I'm still unable to use onPress for a
and here's my code:
I'm seeing the following warning: "Unknown event handler property |
Has there been any update on this? I'm seeing the same issue on expo 51. |
Hello @ed-bennett-dodimead, |
So I just set up a new tamagui repo following the quick start: Edit: same errors can be seen in a project with fewer dependencies: run |
Plus one from me, I also used expo with router |
Hello @ed-bennett-dodimead @horakjakub, |
That's interesting, I cloned yours and I see all the same console errors, except the click handler does seem to fire properly. I'm not sure how to go about testing that further. |
@ed-bennett-dodimead |
onpress is not working for version of react-native-web 0.13.0 and above.
reproducible example
codesandbox
change react-native-web Version below 0.13.0 and it works
The text was updated successfully, but these errors were encountered: