- {React.Children.map(children, (child, i) => {
- return addChildMenuItem({
- child,
- onMouseEnter: () =>
- this.setState({
- hoveringIdx: i,
- }),
- isHovering: () => i === this.state.hoveringIdx,
- })
- })}
+ {React.Children.map(children, (child) => (
+
this.setState({hovering: child})}
+ >
+
+ {child}
+
+
))}