I'm trying to make a react-native app using expo, since expo and metro bundler are compatible with react-native-web, I get my web view and Android/IOS with almost the same code. How can I do something like the equivalent of css :hover in there? Since there's no css and styles are done in Javascript objects like this and later converted to html css elements? Is there a built-in functionality for this or do I need to use a library?
const styles = StyleSheet.create({
element: {
backgroundColor: "#fff",
margin: 20,
}
})
react-native-web supports hover based events in a Pressable via the onHoverIn and onHoverOut props. You can find an example in their docs:
https://necolas.github.io/react-native-web/docs/pressable/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With