Skip to content

Use breakpoint support array #63

@Ayc0

Description

@Ayc0

At the moment, we can do useBreakpoint('md lg'). Instead we should support useBreakpoint(['md', 'lg'])
It would be a bit more performant as we wouldn't have to do the split every time

The issue with using an array is that it'd bust the react cache at each re-render when used in an inline way

const mediaQuery = React.useMemo(() => toMediaQuery(on), [toMediaQuery, on]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions