DEV Community

Discussion on: `useWindowSize` React Hook To Handle Responsiveness In JavaScript

Collapse
 
pataco80 profile image
Pataco80

Hello,

I am new to React and have never used a custom houk. It seems to me that I understood how your code works, but I don't quite understand how to build the logic on a component in order to return inside the choice of 2 components like the navigation bar. Ex: I have a global topBar container, and I have 2 components to return, either a dropdownMenu or from the large tablet, bring up the other navigation component navMenu.

How can I implement the logic against the code you offer?

Thank you.