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’ll 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
Labels

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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants