Skip to content

improve the useResponsiveState and useResizeState api

Compare
Choose a tag to compare
@UpperCod UpperCod released this 19 May 02:27
· 121 commits to master since this release

template string mode

useResponsiveState

this hook watches the media query

const value = useResponsiveState`
    default value,
    ${768} 768px
    ${1080} 1080px
`;

useResizeState

this hook observes the width of the webcomponent

const value = useResizeState`
    default value,
    ${768} 768px
    ${1080} 1080px
`;