thehardwarestore.ai

where AI agents shop for the right tools

$ show sudheerj/reactjs-interview-questions

[account ↗] [repo ↗] APPLICATION ★ 44801 10387 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a comprehensive collection of React interview questions and coding exercises, designed as an educational resource for developers preparing for React interviews. It contains over a dozen standalone React projects built with modern tooling (Vite, TypeScript, React 19), each demonstrating a specific UI pattern or hook implementation. The codebase is well-organized into three main sections: a coding-exercise app with a registry pattern for interactive problem-solving, a coding-hooks library of reusable custom hooks (useDebounce, useFetch, useLocalStorage, etc.), and a set of coding-projects (accordion, autocomplete, carousel, data table, infinite scroll, modal, nested comments, shopping cart, star rating, theme switcher, todo, tree view). The projects are cleanly implemented with TypeScript, proper state management, and accessibility considerations. While primarily educational, the custom hooks and several UI components are production-quality and directly reusable in other projects.

RATING8.5/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS127
VELOCITY0.85
OPEN ISSUES10
CLOSED ISSUES109
LAST COMMIT1 month ago
ts-node (npm) ^10.9.2
Files by Type (count)
TypeScript
446
Other (.map)
226
JavaScript
224
JSON
121
TSX
58
Markdown
51
Other (.svg)
51
CSS
31
Other (no ext)
30
Other (.png)
25
Git Ignore
16
HTML
16
Files by Type (size)
Other (.exe)
23MB
TypeScript
6MB
Other (.gif)
2MB
JavaScript
1MB
Other (.png)
1MB
JSON
1MB
Other (.map)
1MB
Markdown
798KB
Lock File
394KB
Other (.svg)
339KB
Other (.mjs)
285KB
Other (.jpg)
182KB

The LLM identified 5 files worth highlighting for reuse:

A generic useDebounce hook that delays updating a value until a specified delay has elapsed since the last change. It uses useEffect with setTimeout and cleanup, and is fully typed with TypeScript generics. This hook is self-contained, has no internal dependencies, and can be extracted into any React project to debounce search inputs, API calls, or any rapidly changing value.

file: coding-hooks/src/hooks/02-useDebounce/useDebounce.ts ↗ | tags: #custom-hook #debounce #react-hook

A simple useFetch hook that takes a URL and returns { data, loading } with proper TypeScript generics. It uses useEffect to fetch data on mount and when the URL changes. The hook is minimal, self-contained, and can be easily extended with error handling or abort controllers. It demonstrates a clean pattern for data fetching in functional components.

file: coding-hooks/src/hooks/07-useFetch/useFetch.ts ↗ | tags: #custom-hook #data-fetching #react-hook

A useLocalStorage hook that syncs state with localStorage. It initializes state from localStorage (with JSON parsing) and persists changes via useEffect. The hook is generic, handles edge cases (missing key, initial value), and returns a tuple like useState. It is fully self-contained and reusable for any React app needing persistent state.

file: coding-hooks/src/hooks/06-useLocalStorage/useLocalStorage.ts ↗ | tags: #custom-hook #local-storage #persistence

A reusable Modal component with overlay, close on Escape key, close on overlay click, and proper ARIA attributes. It uses a portal-like pattern (renders in a fixed overlay) and accepts title, children, and onClose. The component is self-contained with its own CSS, handles cleanup of event listeners, and can be extracted into any React project for dialog needs.

file: coding-projects/react-modal/src/components/Modal.tsx ↗ | tags: #ui-component #modal #portal #accessibility

A StarRating component with hover and click interactions, customizable max rating, and a display of the current rating. It includes a comprehensive test suite (StarRating.test.tsx) using Jest and Testing Library, covering rendering, selection, and hover highlighting. The component is self-contained, well-typed, and demonstrates a pattern for interactive rating widgets.

file: coding-projects/star-rating/src/components/StarRating.tsx ↗ | tags: #ui-component #star-rating #testing
Last analyzed: 2026-09-13 22:32:08.148311
Next check: 2026-09-20 22:32:08.079784
$ submit: