It can be done without useMemo and useRef however still using eventHandlers:


<Marker
  position={[latitude, longitude]}
  icon={getIcon(markerType)}
  eventHandlers={{
    mouseover: (event) => event.target.openPopup(),
  }}
>
  <Popup>Hello</Popup>
</Marker>;

Answer from Disco on Stack Overflow
๐ŸŒ
Semantic UI React
react.semantic-ui.com โ€บ modules โ€บ popup
Popup - Semantic UI React
A popup can be triggered on hover, click, focus or multiple actions.
Discussions

How to toggle popup in react-leaflet on mouse hover
Note: I know I can't trigger the function openPopup there its just to show where I want to implement the trigger function to toggle the popup on mouse hover. More on stackoverflow.com
๐ŸŒ stackoverflow.com
August 3, 2018
tooltip div with ReactJS - javascript
Exactly, simple and pragmatic. The only downside I see is that you have to wait that default amount of time before the popup actually shows (maybe a browser setting?) versus using other custom library or package which I've used before that display the popup immediately on hover. More on stackoverflow.com
๐ŸŒ stackoverflow.com
Popup: can be triggered on hover and click
The desired behaviour of a on={['hover', 'click']}popup is to stay open when clicked and the user hovers out of the trigger, right? So e.g. the user can copy sth. More on github.com
๐ŸŒ github.com
11
December 7, 2018
How To Keep An Inner Menu Open As You Hover Over The Button?
I've had this where there's a minimal gap between the li element and the nested ul, which caused it to close before you reach it. But you can add a transition-delay while it is being hovered to stay for like 500ms or something like that so that it will stay open even if you move off of it or something for a split second. More on reddit.com
๐ŸŒ r/reactjs
5
2
August 11, 2023
๐ŸŒ
MUI
mui.com โ€บ material-ui โ€บ react-tooltip
React Tooltip component - Material UI
The tooltip is normally shown immediately when the user's mouse hovers over the element, and hides immediately when the user's mouse leaves. A delay in showing or hiding the tooltip can be added through the enterDelay and leaveDelay props.
๐ŸŒ
CodePen
codepen.io โ€บ joykureel โ€บ pen โ€บ RXKRqv
hover popup modal in react
class App extends React.Component{ state={ likeList:'' } renderLikeList = () =>{ return <div className="likes__list" >Likes to be rendered specifically</div> } handleLeave=()=>{ return this.setState({likeList:''}) } handleHover=()=>{ return this.setState({likeList:this.renderLikeList()}) } render(){ return( <div className="likes__wrapper" > <div className="likes__relavance" onMouseOver={this.handleHover} onMouseLeave={this.handleLeave}> Hover me {this.state.likeList} </div> </div> ) } } ReactDOM.render(<App/>,document.getElementById('root'));
๐ŸŒ
MUI
mui.com โ€บ material-ui โ€บ react-popover
React Popover component - Material UI
<Button aria-describedby={id} variant="contained" onClick={handleClick}> Open Popover </Button> <Popover id={id} open={open} anchorEl={anchorEl} onClose={handleClose} anchorOrigin={{ vertical: 'bottom', horizontal: 'left', }} > <Typography sx={{ p: 2 }}>The content of the Popover.</Typography> </Popover>
๐ŸŒ
CodeSandbox
codesandbox.io โ€บ s โ€บ 5w4mvo5q9n
React Hover Popup - CodeSandbox
January 29, 2020 - React Hover Popup by achanta3215 using react, react-dom, react-redux, react-scripts, redux, redux-form, semantic-ui, semantic-ui-react, styled-components
Published ย  Oct 01, 2018
Author ย  achanta3215
๐ŸŒ
CodeSandbox
codesandbox.io โ€บ s โ€บ react-tooltip-with-hover-j967n
react tooltip with hover - CodeSandbox
March 9, 2020 - react tooltip with hover by sl-pascalgeay using react, react-dom, react-scripts
Published ย  Mar 09, 2020
Author ย  sl-pascalgeay
Find elsewhere
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ react-modal-hover
react-modal-hover - npm
June 12, 2021 - Hovering over the desired component will open a modal with another component shown as information Take care with the width of the element you want to hover ... <ModalHover onHover={<MySocialMediaComponent/>} legendPos="left" legendMsg="Follow ...
      ยป npm install react-modal-hover
    
Published ย  Jun 12, 2021
Version ย  1.1.13
Author ย  @carlostorreswav
๐ŸŒ
Elazizi
react-popup.elazizi.com โ€บ react-tooltip
React Tooltip | ReactJs Popup: Modals, Tooltips and Menus, All in One
import React from 'react';import Popup from 'reactjs-popup';import Card from './Card';// const POSITION_TYPES = [ 'top left', 'top center', 'top right', 'right top', 'right center', 'right bottom', 'bottom left', 'bottom center', 'bottom right', 'left top', 'left center', 'left bottom', 'center center',]; const ToolTipPositions = () => ( <div className="example-warper"> {POSITION_TYPES.map((position, i) => ( <Popup key={`tp-${i}`} trigger={ <button type="button" className="button"> {position} </button> } position={position} on={['hover', 'focus']} arrow={position !== 'center center'} > <Card title={position} /> </Popup> ))} </div>);Copy ยท
๐ŸŒ
LogRocket
blog.logrocket.com โ€บ home โ€บ controlling tooltips & pop-up menus with components in react
Controlling tooltips & pop-up menus with components in React - LogRocket Blog
June 4, 2024 - This article will introduce you to the approach I followed to implement a tooltip controller component in React. Although I call it tooltip, it can be anything that you want to display when an element inside the DOM is interacted with via a click or hover. A pop-up menu example from Medium. I will only be covering the fundamentals here.
๐ŸŒ
CodingDeft
codingdeft.com โ€บ posts โ€บ react-on-hover
How to handle Mouse Hover Event in React | CodingDeft.com
If you want to display a text when the button is hovered, you can do so by introducing a state and by setting it to true when the button is hovered and by setting it to false when the mouse is moved out: ... There are a couple of other events ...
๐ŸŒ
Elazizi
react-popup.elazizi.com โ€บ component-api
Component API | ReactJs Popup: Modals, Tooltips and Menus, All in One
Events triggering the popup. Enums or Array of : 'hover' 'click' 'focus' 'right-click' .
๐ŸŒ
HackerNoon
hackernoon.com โ€บ how-to-handle-hover-events-in-react
How to Handle Hover Events in React | HackerNoon
January 8, 2024 - In this guide, you will see how to handle hover events, one of the most common user interactions in web apps.
๐ŸŒ
GitHub
github.com โ€บ Semantic-Org โ€บ Semantic-UI-React โ€บ issues โ€บ 3327
Popup: can be triggered on hover and click ยท Issue #3327 ยท Semantic-Org/Semantic-UI-React
December 7, 2018 - https://react.semantic-ui.com/modules/popup/#usage-multiple The desired behaviour of a on={['hover', 'click']}popup is to stay open when clicked and the user hovers out of the trigger, right? So e....
Author ย  Obiwarn
๐ŸŒ
Bobby Hadz
bobbyhadz.com โ€บ blog โ€บ react-show-element-on-hover
Show an Element or Text on Hover in React | bobbyhadz
The code sample shows how to show an element while hovering over another element. We set the onMouseOver prop on the div element, so every time the user hovers over the element, the handleMouseOver function is invoked.
๐ŸŒ
MUI
v6.mui.com โ€บ base-ui โ€บ react-popup
React Popup component - MUI Base
'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)' }, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]}; &:hover { background-color: ${blue[600]}; } &:active { background-color: ${blue[700]}; box-shadow: none; } &:focus-visible { box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]}; outline: none; } &.disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; &:hover { background-color: ${blue[500]}; } } `, ); ... By default, clicking outside the Popup doesn't hide it.
๐ŸŒ
CoderPad
coderpad.io โ€บ blog โ€บ development โ€บ react-tooltip-a-how-to-guide
React-tooltip: A How-To Guide - CoderPad
June 7, 2023 - All tooltips have two components: one is the trigger UI element, and the other is the tooltip itself. The trigger UI element is what actually triggers the tooltip when you either hover your mouse over it or click on it.