Resources

100 React (general) resources for developers

This resource provides a technical roadmap for building and optimizing modern React applications using React 19, Vite, and the TanStack ecosystem. It focuses on production-ready patterns for state management, component architecture, and performance testing.

Modern State Management and Data Synchronization

  1. 1

    Zustand Store Implementation

    beginnerhigh

    Create small, focused stores using the 'create' function to manage global UI state without the boilerplate of Redux or the re-render issues of Context.

  2. 2

    React Query useQuery for Caching

    intermediatehigh

    Implement 'useQuery' with custom 'staleTime' and 'gcTime' to manage server-state fetching and automatic background revalidation.

  3. 3

    Optimistic UI with React 19 useOptimistic

    advancedmedium

    Use the 'useOptimistic' hook to provide immediate visual feedback during form submissions before the server responds.

  4. 4

    Zod Schema Validation for Form State

    intermediatestandard

    Integrate Zod with React Hook Form to enforce strict type safety and runtime validation for complex user inputs.

  5. 5

    Context API for Design Tokens

    beginnerstandard

    Limit Context usage to static or rarely changing data like theme modes (dark/light) or localization strings to avoid performance degradation.

  6. 6

    Jotai for Atomic State

    advancedmedium

    Apply Jotai atoms for granular state updates in performance-sensitive areas like canvas editors or complex dashboard widgets.

  7. 7

    React Query Mutation Side Effects

    intermediatehigh

    Utilize the 'onSuccess' and 'onSettled' callbacks in 'useMutation' to trigger cache invalidations via 'queryClient.invalidateQueries'.

  8. 8

    Zustand Middleware for Persistence

    beginnerstandard

    Apply the 'persist' middleware to automatically sync specific store slices to localStorage or sessionStorage.

  9. 9

    Handling Server Actions

    advancedhigh

    Implement React 19 Server Actions to handle form submissions directly, reducing the need for manual fetch calls and loading state management.

  10. 10

    TanStack Query DevTools

    beginnerstandard

    Integrate the ReactQueryDevtools component to visualize query states, cache timing, and network fetch status during development.

  11. 11

    Custom Hook Data Abstraction

    intermediatehigh

    Wrap React Query calls in custom hooks (e.g., useUser, useOrders) to decouple UI components from API endpoints.

  12. 12

    React 19 useActionState Hook

    intermediatemedium

    Manage form state and server-side validation errors using the 'useActionState' hook for native-feeling form handling.

Component Architecture and UI Tooling

  1. 1

    shadcn/ui Component Installation

    beginnerhigh

    Use the 'npx shadcn-ui@latest add' command to pull accessible, unstyled components directly into your local 'components/ui' folder.

  2. 2

    Tailwind Merge for Dynamic Classes

    beginnerstandard

    Utilize 'twMerge' and 'clsx' utility functions to resolve Tailwind class conflicts in reusable component libraries.

  3. 3

    Class Variance Authority (CVA)

    intermediatemedium

    Define component variants (size, color, intent) in a structured object to maintain type-safe CSS-in-JS patterns within Tailwind.

  4. 4

    Radix UI Primitive Integration

    intermediatehigh

    Build custom UI components on top of Radix primitives to ensure keyboard navigation and screen reader support out of the box.

  5. 5

    Compound Component Pattern

    advancedmedium

    Structure components like Tabs or Select using a parent-child context relationship for flexible and readable JSX.

  6. 6

    Storybook Interaction Testing

    intermediatestandard

    Write 'play' functions in Storybook to automate user interaction tests for UI components without launching a full browser environment.

  7. 7

    Polymorphic Components with 'asChild'

    advancedmedium

    Use the 'Slot' pattern from Radix UI to allow components to merge their props into a child element, improving HTML semantic flexibility.

  8. 8

    Lucide React Icon Optimization

    beginnerstandard

    Import specific icons directly (e.g., import { Home } from 'lucide-react') to ensure tree-shaking keeps the bundle size minimal.

  9. 9

    Framer Motion Layout Animations

    intermediatestandard

    Apply the 'layout' prop to Framer Motion components to automatically animate position changes when the DOM structure updates.

  10. 10

    React Aria for Complex Inputs

    advancedhigh

    Use Adobe’s React Aria hooks to implement high-accessibility behaviors for non-standard inputs like date range pickers.

  11. 11

    Barrel Export Management

    intermediatestandard

    Avoid massive 'index.ts' barrel files in large projects to prevent Vite from over-parsing modules and slowing down HMR.

  12. 12

    Container/Presenter Pattern Refactoring

    intermediatemedium

    Refactor complex components by separating data-fetching logic (containers) from pure UI rendering (presenters) for better testability.

Performance Optimization and Testing

  1. 1

    React Compiler Integration

    advancedhigh

    Enable the React Compiler in your build pipeline to automate 'useMemo' and 'useCallback' logic based on static analysis.

  2. 2

    Vitest Unit Testing Setup

    beginnerhigh

    Configure Vitest with 'jsdom' and '@testing-library/react' for fast, Vite-native component unit tests.

  3. 3

    Mock Service Worker (MSW) Setup

    intermediatehigh

    Intercept network requests at the service worker level to provide realistic API mocks for both testing and local development.

  4. 4

    React Testing Library user-event

    intermediatestandard

    Replace 'fireEvent' with '@testing-library/user-event' to more accurately simulate browser events like typing and clicking.

  5. 5

    useDeferredValue for Search Filtering

    intermediatemedium

    Implement 'useDeferredValue' to keep the UI responsive by deferring the re-rendering of large lists during rapid text input.

  6. 6

    Rollup Plugin Visualizer

    beginnermedium

    Add 'rollup-plugin-visualizer' to your Vite config to generate a treemap of dependency sizes and identify bloat.

  7. 7

    React Profiler for Render Bottlenecks

    intermediatestandard

    Use the React DevTools Profiler tab to identify 'Commit' phase delays and unnecessary component re-renders.

  8. 8

    Lazy Loading with React.lazy

    beginnerhigh

    Implement Code Splitting using 'React.lazy' and 'Suspense' for route-level components to reduce the initial JS payload.

  9. 9

    Axe-core Accessibility Auditing

    intermediatestandard

    Integrate 'jest-axe' or 'vitest-axe' into your test suite to catch common WCAG violations automatically during CI/CD.

  10. 10

    TanStack Router Type Safety

    advancedhigh

    Migrate to TanStack Router to achieve 100% type safety for route parameters, search params, and navigation links.

  11. 11

    Memoizing Expensive Computations

    intermediatestandard

    Apply 'useMemo' for heavy data transformations (e.g., sorting 1000+ items) to avoid recalculation on every render.

  12. 12

    Eslint-plugin-react-refresh

    beginnerstandard

    Ensure 'eslint-plugin-react-refresh' is active to validate that your components are compatible with Fast Refresh during development.