Skip to content

Instantly share code, notes, and snippets.

@jickoo
jickoo / gwk.sh
Created November 11, 2022 07:04 — forked from SungjinYoo/gwk.sh
#!/bin/bash
#==============================================================================
# GW-Kit
# @author : (origin) yunsang.choi([email protected])
# @author : (forked) jinkwon([email protected])
# @src : (origin) https://gist.github.com/gists/3115022
# @src : (forked) https://github.com/Jinkwon/naver-gw-kit/
#-------
@jickoo
jickoo / interval.hook.ts
Created February 22, 2021 16:02 — forked from Danziger/interval.hook.ts
✨ Declarative useTimeout (setTimeout), useInterval (setInterval) and useThrottledCallback (useCallback combined with setTimeout) hooks for React (in Typescript)
import React, { useEffect, useRef } from 'react';
/**
* Use setInterval with Hooks in a declarative way.
*
* @see https://stackoverflow.com/a/59274004/3723993
* @see https://overreacted.io/making-setinterval-declarative-with-react-hooks/
*/
export function useInterval(
callback: React.EffectCallback,