A curated React knowledge base, utilities library, and experimentation workspace.
This is a long-term, evolving reference for professional React development. It's not a starter template or tutorial — it's the accumulated set of hooks, utilities, components, and notes I actually reach for on real projects, kept in one place so patterns don't get reinvented (or forgotten) between repos.
| Hook | Purpose |
|---|---|
useDebounce |
Debounce a fast-changing value (search inputs, filters) |
useEventListener |
Attach/detach DOM event listeners with automatic cleanup |
useOutsideClick |
Detect clicks outside a ref'd element (dropdowns, modals) |
useOnlineStatus |
Track navigator.onLine connectivity state |
useMediaQuery |
Reactively match CSS media queries |
useHover |
Track hover state on a ref'd element |
useClipboard |
Copy text to clipboard with success/error state |
useFetch |
Lightweight data-fetching hook with loading/error state |
useTheme |
Light/dark theme state with persistence |
| Function | Purpose |
|---|---|
debounce |
Framework-agnostic debounce |
throttle |
Framework-agnostic throttle |
formatDate |
Date formatting helpers |
classNames |
Conditional class name concatenation |
storage |
Typed localStorage wrapper |
Lightweight, dependency-light UI primitives: Modal, Toast, Tooltip, Pagination, Loader.
Standalone, copy-pasteable examples: ErrorBoundary, PortalExample, SuspenseExample, plus a few hook variants kept here as teaching examples rather than shipped hooks.
Structured conceptual references, organized by depth:
fundamentals/— JSX, props/state, lifecycle, renderingadvanced/— context, suspense, error boundaries, performance, hooks in deptharchitecture/— folder structure, atomic design, clean code patterns, project setupecosystem/— Vite, Next.js, Redux Toolkit, Zustand, TanStack Query, Tailwind, Testing Library
Config references for ESLint/Prettier, Husky, lint-staged, Vite/Next config, Axios interceptors, git tips, VS Code extensions.
Career-and-practice adjacent guides: best practices, interview questions, learning resources, project checklist, roadmap.
Isolated Vite and Next.js sandboxes for trying a pattern before it graduates into hooks/ or utils/.
git clone https://github.com/jackson951/react-developer-utils.git
cd react-developer-utils
npm installRun a playground environment:
cd playground/vite-demo && npm install && npm run dev
# or
cd playground/next-demo && npm install && npm run devimport { useDebounce } from "./hooks/useDebounce";
function SearchBox() {
const [query, setQuery] = useState("");
const debouncedQuery = useDebounce(query, 300);
useEffect(() => {
if (debouncedQuery) fetchResults(debouncedQuery);
}, [debouncedQuery]);
return <input value={query} onChange={(e) => setQuery(e.target.value)} />;
}All hooks and utilities are dependency-free unless explicitly stated.
- Predictable over clever
- Composable by default
- Minimal abstraction
- Explicit configuration
- Documentation as part of the system
This repo is intentionally opinionated and personal, but issues/PRs pointing out bugs, better patterns, or React-version updates are welcome.
- Add patterns encountered in real projects
- Refine or remove outdated approaches
- Keep examples minimal and focused
- Favor clarity over completeness
MIT — unrestricted use in personal and commercial projects.
This repository is a working system, not a finished product.