Return type for the useContainerBreakpoint hook.
const { isBelowBreakpoint, containerRef } = useContainerBreakpoint(700);return ( <div ref={containerRef}> {isBelowBreakpoint ? <MobileLayout /> : <DesktopLayout />} </div>); Copy
const { isBelowBreakpoint, containerRef } = useContainerBreakpoint(700);return ( <div ref={containerRef}> {isBelowBreakpoint ? <MobileLayout /> : <DesktopLayout />} </div>);
Ref to attach to the container element.
Whether the container width is below the breakpoint.
Return type for the useContainerBreakpoint hook.
Example