Custom React hook that checks if the current viewport breakpoint is 'tablet'.
const MyComponent = () => { const isTablet = useIsViewportTablet(); return ( <div> {isTablet ? 'Viewport is of tablet size.' : 'Not tablet.'} </div> );};
Custom React hook that checks if the current viewport breakpoint is 'tablet'.
Example