Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AlfonzAlfonz opened this issue Aug 3, 2022 · 0 comments
Open

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

AlfonzAlfonz opened this issue Aug 3, 2022 · 0 comments

Comments

@AlfonzAlfonz
Copy link
Contributor

馃悰 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.

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

No branches or pull requests

2 participants