Skip to content

Instantly share code, notes, and snippets.

Mordy Tikotzky tikotzky

Block or report user

Report or block tikotzky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View use-key-press-example.jsx
import { useState, useEffect } from 'react';
// Usage
function App() {
// Call our hook for each key that we'd like to monitor
const happyPress = useKeyPress('h');
const sadPress = useKeyPress('s');
const robotPress = useKeyPress('r');
const foxPress = useKeyPress('f');
View gist:2a84667250d1c713f84e
function fetchJSON(options, cb) {
const wrappedCb = (...args) => setTimeout(() => cb(...args), 0);
then(res => res.json()).
then(json => wrappedCb(null, json), err => wrappedCb(err))
View gist:39649f977f4319c2cf3d
### Keybase proof
I hereby claim:
* I am tikotzky on github.
* I am tikotzky ( on keybase.
* I have a public key whose fingerprint is A046 6A89 6994 850A 05CC 9A27 4D0F A8B7 DF2C A035
To claim this, I am signing this object:
You can’t perform that action at this time.