Skip to content

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

Some snippets I saved, that are not enough to be a blog post.
Slowly updating and adding more
Adding delay in DEV requests with axios
Slowing down requests, and making DEV env feel more natural
AxiosTypeScriptDev Environment
camelCase model properties in AdonisJS
Serializing AdonisJS models to camelCase globally
AdonisJSTypeScriptORMNaming Strategy
Cloudinary image as blur hash
Generating blur hash from Cloudinary images for my covers
TypeScriptImage Processing
Domain Model with Zod & FP-TS
One-stop-shop for all our domain needs
FP-TSTypeScript
FP-TS partition
Partition a collection using FP-TS
FP-TSTypeScript
FP-TS ReaderTaskEither
Quick look on how to use ReaderTaskEither
FP-TSTypeScript
Nominal types
Using nominal types to create type-safe identifiers
TypeScript
Rate limit in NestJS
Using request rate limit
NestJSExpressRate LimitingMiddleware
useCopy
React hook for clipboard copy
ReactReact Hooks
useDebounce
React hook for debouncing value changes
ReactReact Hooks
useNavigatorOnline
React hook to detect when your browser is online/offline
ReactReact Hooks
useObservable
React hook with useSyncExternalStore to subscribe to an observable
ReactReact Hooks
usePrevious
React hook to keep previous value
ReactReact Hooks