Skip to content
Advertisement

Is there a anything in react native that responds to a mouse hover over event?

Using the latest react-native library.

Is there a way to respond to a mouse hovering over a component in react native?

I can’t find any components in the library that use this capability

Advertisement

Answer

I assume you are using react-native-web ? mouse hover events happen on the web.

EDIT: as @user56reinstatemonica8 said hover events can also happen on Android/iOS

if so you can use this useHover hook from react-native-web-hooks to respond to mouse hover events.

Otherwise you can use Touchables in react-native to handle touch events.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement