Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 ReasonML。
我想创建一个工具提示元素。它应该包装一个 React.element 并提供由鼠标事件触发的工具提示功能。
但我根本不希望它出现在 DOM 中,因为这会破坏布局。我试过使用 display: contents,但一些 CSS 规则仍然会被打乱。
是否可以通过添加到它的属性或获取引用并通过它添加它来将 mouseevent 侦听器添加到 children:React.element 对象?