`Active` state in components are returning true on element hover
See original GitHub issueThe Active
state inside your componenets are returning true when cursor is hovered over the element.
Snippet of code
{({ active }) => (
<a className={`${active && 'bg-blue-500'}`} href="/account-settings">
Account settings
</a>
)}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
How can I access a hover state in reactjs? - Stack Overflow
You will want to add handlers for onMouseEnter and onMouseLeave for hover behavior. Save this answer.
Read more >React onHover Event Handling (with Examples) - Upmostly
When hovering an element, we want to detect the following states for an HTML element: Beginning to hover over an element; Leaving a...
Read more >Show an Element on Hover in React | bobbyhadz
Track whether the user is hovering over the element in a state variable. Conditionally render the other element based on the state variable....
Read more >Elements that are hidden when in the hover state come back ...
I hit this bug on a dropdown select component which was keeping the hover state between open->close->open. Changing the keys at the point...
Read more >Element: mouseover event - Web APIs | MDN
Returns true if the alt key was down when the mouse event was fired. MouseEvent.button Read only. The button number that was pressed...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I dont think its correct merging these different behaviors into one. 😃
This is confusing terminology, I was expecting active to mean what it says. FWIW: I’ve ended up on this issue because I was looking for clarification, I don’t think the docs cover it as well as they could.
e.g.
No idea what that means
@RobinMalfait What you say here is a better explanation:
It could be beneficial for other users to reopen this issue and the docs could be updated as the outcome?