Home > Enterprise >  React HOC functional component: How to make any children have Parent's state and logic
React HOC functional component: How to make any children have Parent's state and logic

Time:12-22

I am trying to create a React function Hover component (Edit romantic-allen-fl31f

CodePudding user response:

You are closing the WithHover tag the wrong way and see the error is displayed on the screen as well. It is clearly showing you the way to resolve this issue by pointing out the error due to which it is failing. As Dennis Vash has mentioned in his answer the tag should be closed like:

<WithHover>
  <Button>foo</Button>
</WithHover>
  • Related