Skip to content

digitalrelab/react-use-keyup

Repository files navigation

react-use-keyup

A simple keyUp hook for React.

Installation

yarn add @digitalrelab/react-use-keyup

Usage

import { useKeyUp } from "@digitalrelab/react-use-keyup"

function App() {
  useKeyUp("esc", onEsc)

  function onEsc(event) {
    event.preventDefault()

    console.log("You just pressed esc.")
  }

  return <div>Hello world!</div>
}

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •