I'm trying to hide some components when the screen hits some specific breakpoint.
My thought process was to store the screen width in a state then when it's below my breakpoint I set the display: none
.
The question is how to access the screen width/viewport width in react? and is that the best approach for a responsive design?