The stale closure, your debounced callback saves old state
REACTStabilizing a debounce with useMemo(() => debounce(fn, 300), []) fixes one bug and creates a worse one: the callback is…
react19debounce
@DevDhaifShare state across components with useState, never a module-level ref, on SSR
NUXTOn the server a module-level ref is created once and shared by every request, so one user's cart can leak into another'…
nuxt4state
@hnoozHandle form mutations with built-in pending and error state via useActionState
REACTuseActionState wraps an async action and returns the last result, the action to bind to a <form action>, and a pending…
react19forms
@hnoozReplace modelValue/update boilerplate with defineModel() for v-model
VUEdefineModel() returns a writable ref wired to the parent's v-model, collapsing the modelValue prop plus update:modelVal…
v-modelcomponents
@hnoozCancel stale async work in watchers with onWatcherCleanup()
VUERegistered inside the watcher callback, onWatcherCleanup runs before the next invocation and on stop. It removes the ma…
watchersasync
@hnoozGenerate hydration-safe unique IDs with useId() for accessibility
VUEuseId() produces IDs that are stable and identical across server render and client hydration, so label/for and aria-des…
ssraccessibility
@hnooz