Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Adding text above an image with onMouseEnter in React Native

$
0
0

I want to have text apear above my image when my mouse hover over it. I tryed some things, but the onMouseEnter/onMouseLeave seems the most promising. Howether I encountered an error:When I hover over my image, my text is not here. Here is my code :

<View            style={{              flex: 1,              justifyContent: "center",            }}><div              onMouseEnter={() => {<Text>Hi here</Text>;              }}              onMouseLeave={() => {}}><Image                source={screen2}                style={{                  width: "80%",                  height: "80%",                  marginBottom: 150,                  marginTop: 120,                  marginLeft: "-10%",                }}              /></div></View>

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>