use-responsive-state
Declare a state based on a responsive expression similar to using the tag img[srcset].
Module
import { useResponsiveState } from "@atomico/hooks/use-responsive-state";Syntax
const expression = "phone, tablet 720px, destop 1080px";
const state = useResponsiveState(expression);const state = useResponsiveState`
phone, tablet 720px, destop 1080px
`;Expressions
"<defaultState>, <caseState> <size>"Example
Last updated
Was this helpful?
