Hey, it’s me again. Two articles in one month??
I had some fun playing around with keyboard shortcuts in React and wrote about it over the last few days. I set up a hook to enable shortcuts consisting of single, multiple, or a sequence of key presses. If you use React and don’t understand when useCallback
is necessary, the article also goes into that. It also includes some live demos and the Konami Code (everyone still knows what that is, right?).
Creating a Keyboard Shortcut in React
In other news, I’ve been sick for over a week, which probably explains why I’ve been sitting around writing articles and deciding to rewatch Game of Thrones.
I’m having fun writing articles again and making example code, so hopefully I’ll keep doing so for the rest of the year.
Have a nice week!
— Tania