Skip to content

Code Snippets. React, TypeScript, Node.js & more

Keeping that odd snippet for future reference.
Slowly updating and adding snippets
Adding delay in DEV requests with axiosSlowing down requests, and making DEV env feel more naturalAxiosTypeScriptDev EnvironmentView
camelCase model properties in AdonisJSSerializing AdonisJS models to camelCase globallyAdonisJSTypeScriptORMNaming StrategyView
Cloudinary image as blur hashGenerating blur hash from Cloudinary images for my coversTypeScriptImage ProcessingView
Domain Model with Zod & FP-TSOne-stop-shop for all our domain needsFP-TSTypeScriptView
FP-TS partitionPartition a collection using FP-TSFP-TSTypeScriptView
FP-TS ReaderTaskEitherQuick look on how to use ReaderTaskEitherFP-TSTypeScriptView
Nominal typesUsing nominal types to create type-safe identifiersTypeScriptView
Rate limit in NestJSUsing request rate limitNestJSExpressRate LimitingMiddlewareView
useCopyReact hook for clipboard copyReactReact HooksView
useDebounceReact hook for debouncing value changesReactReact HooksView
useNavigatorOnlineReact hook to detect when your browser is online/offlineReactReact HooksView
useObservableReact hook with useSyncExternalStore to subscribe to an observableReactReact HooksView
usePreviousReact hook to keep previous valueReactReact HooksView