Skip to content

Instantly share code, notes, and snippets.

View ashuvssut's full-sized avatar
gonna be a kickass indie developer

Ashutosh Khanduala ashuvssut

gonna be a kickass indie developer
View GitHub Profile
@ashuvssut
ashuvssut / debounce-hooks.ts
Last active March 8, 2025 15:57
How to use lodash debounce & lodash throtte in react
import debounce from 'lodash.debounce'
import throttle from 'lodash.throttle'
import { useCallback } from 'react'
import type {
DebounceSettings,
DebounceSettingsLeading,
DebouncedFunc,
DebouncedFuncLeading,
ThrottleSettings,
ThrottleSettingsLeading,
@ashuvssut
ashuvssut / chatsSlice.ts
Last active January 10, 2023 19:45 — forked from markerikson/chatsSlice.ts
Nested `createEntityAdapter` example
// Example of using multiple / nested `createEntityAdapter` calls within a single Redux Toolkit slice
interface Message {
id: string;
roomId: string;
text: string;
timestamp: string;
username: string;
}