by reading the documentation, I thought the good solution in later material-ui was useMediaQuery
, but at best I can't get it right. My goal is to hide a menu when the page is printed, so I wrote something like:
if (!useMediaQuery("print")) {
... code to be hidden
}
which compiles an execute fine, but doesn't work. It seems that the component isn't rendered when the browser goes in print preview mode (FF 65).
Any idea on how to acheive this?