0.1.0 • Published 3 years ago
use-arrow-keys v0.1.0
use-arrow-keys
A custom React Hook for navigation keys.
Usage
import useArrowKeys from 'use-arrow-keys'
const onLeftKey = () => console.log('⬅️')
const onRightKey = () => console.log('➡️')
const App = () => {
useArrowKeys({ onLeftKey, onRightKey })
render (
<div>Try clicking arrow keys!</div>
)
}
License
MIT Licensed
0.1.0
3 years ago