A breakpoint provider that syncs up with your screens in tailwind.config.js. Common use is to fully remove elements from the dom rather than hide them with css.
July 11, 2021 ยท View on GitHub
import React from 'react'; import { useMinScreen } from './minScreen';
const App = () => { const { min } = useMinScreen();
return (
<>
{minmd &&
I'll show at md and up
}
{!minlg && I'll show at up to lg
}
{minsm && !minxl && I'll show between sm and xl
}
</>
);
};
export default App;