Skip to content

Instantly share code, notes, and snippets.

@romanown
romanown / image-zoom-on-hover-in-react.markdown
Created November 4, 2020 18:49
Image zoom on hover in React
@romanown
romanown / debounce.js
Created March 17, 2021 21:46 — forked from just-boris/debounce.js
small debounce implementation without lodash
export const DEBOUNCE_DEFAULT_DELAY = 200;
export default function debounce(func, delay = DEBOUNCE_DEFAULT_DELAY) {
let timeout;
return function(...args) {
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(() => {