Newbie here. Is there a simple solution to check the screen width/height in React? To be more exact, i want to know if the screen is landscape, or portrait and arrange my components based on this
Would this do it?
CSS also offers the ability to do media queries based on orientation:
hi, thanks for the suggestion, ill try the
i know, i did find that solution, but i try to run bootstrap classes and styles in my react app and the logic needs to be part of the js code, not the css sheets. Im unsure if there is convenient way to make a css media query and toggle it off/on in react
with some tweaking i seem to be able to use this approach to cover my needs