Skip to content
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

Added mouse hover event for react-native-web #65

Closed
wants to merge 1 commit into from

Conversation

neerajkh96
Copy link

This will add mouse hover events for react-native-web.
It will now show the tooltip popup on the "onMouseEnter" event, and will hide the tooltip on the "onMouseLeave" event.

@AndreiCalazans AndreiCalazans added the enhancement New feature or request label Feb 3, 2021
@AndreiCalazans
Copy link
Owner

Interesting. Thanks for the contribution.

I'll have time over the weekend to check it out. Curious, is this all we need to support react-native-web? How did you test this? Did you validate if it causes any regression to React Native?

@neerajkh96
Copy link
Author

neerajkh96 commented Feb 3, 2021

React-native-web setup is altogether a different journey. I followed the steps from the official document to convert the existing mobile project to a web project.
The link is https://necolas.github.io/react-native-web/docs/?path=/docs/overview-getting-started--page , and my react-native mobile application was successfully able to run on the web browser.

The detailed document to complete the react-native-web setup is available here. https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/

Rn-tooltip is by default supported in react-native-web. there is no extra setup required for this library to support react-native-web.

I was using rn-tooltip to show the information popup on the mobile, but there was a requirement to show the tooltip popup on the mouse hover event on the website. So, I have just added mouse hover events in TouchableOpacity.

"Did you validate if it causes any regression to React Native?" I validated in the existing react-native application also, it did not have any impact there.

@BossBele
Copy link

Tested this on Expo WEB and seems buggy on my end (doesn't fully support web/Expo Web)

@AndreiCalazans
Copy link
Owner

I appreciate the PR but it's not in my intention to extend this library to support web. Feel free to fork it and use your own version. Thank you for understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants