Skip to content

useUp & useDown accept number values but don't support themΒ #378

Description

@AlfonzAlfonz

πŸ› Bug Report

Hooks useUp & useDown have following type declaration:

declare const useUp: (key: string | number) => boolean;
declare const useDown: (key: string | number) => boolean;

but calling useUp(1024) always returns false.

To Reproduce

const App = () => {
  const upLg = useUp(1024);

  return <>{upLg ? ">lg" : "<lg"}</>
}

Expected behavior

useUp & useDown should either disallow number values or handle them properly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions