3 ms·
Seems like just lack of experience. You can even do it simply with JS with onHoverIn / onHoverOut
by teg4n_ 3y ago
Seems like just lack of experience. You can even do it simply with JS with onHoverIn / onHoverOut
- deleted 3y ago[deleted]
- graypegg 3y agoWhile that's possible, it's a lot more fault tolerant to use the declarative :hover rule, than it is to handle it procedurally. The browser knows how to handle odd pointing devices, touch states and won't ever have to deal with uncaught errors in a mouseover/mouseout event.
- teg4n_ 3y agofor sure, was just an example that there are apis, that could have been reached for even without CSS knowledge that would make it easier than trying to get the position of the mouse on the screen, the position of the target element and if they overlap
- Timon3 3y agoThere is no onHoverIn or onHoverOut in JS.
- teg4n_ 3y agoyeah sorry that’s the react-native equivalent. you could use mouseenter / mouseleave events