I am currently working on a project where I need to conceal certain components when the screen reaches a particular breakpoint. To achieve this, I plan to save the screen width in a state variable and toggle the display property to "none" when it falls below the designated breakpoint.
My main query is related to accessing the screen width or viewport width in React. Additionally, I am wondering if this approach is considered optimal for creating responsive designs?