Skip to content

Instantly share code, notes, and snippets.

@marshallmurphy
Created April 27, 2020 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshallmurphy/156364f9c73e5337b9e0aad35e7fe8bb to your computer and use it in GitHub Desktop.
Save marshallmurphy/156364f9c73e5337b9e0aad35e7fe8bb to your computer and use it in GitHub Desktop.
const [active, setActive] = useState(false);
function closeMenu(e) {
(e.keyCode === 9 && !e.shiftKey) && setActive(false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment