RSSAmplifier

Max Leiter · Dec 28, 2021

useMousetrap()

0
Sign in to vote or save

This page did not load. You can still read it on the original site — the toolbar below keeps your place in the directory.

I've been messing around with a React implementation of The Lounge lately (for no real reason except that I can) and wanted a functional way to use Mousetrap , which TL already uses. The below hook let me replace the Vue use of Mousetrap (which was pretty much vanilla JS) in a React-like fashion. For bonus typing, add `@types/mousetrap` to your project. Usage is pretty simple:…

Read on maxleiter.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.