TypeScript, React and Next.js Guide for Developers

This guide connects the TypeScript series with the React and Next.js lessons: types and generics first, then how React renders, how hooks and Suspense work, and how to choose state tools and test what you build.

It suits developers who already build UIs and want a stronger model of why things behave the way they do.

Who it is for: Front-end and full-stack developers, and interview candidates for React, Next.js and TypeScript roles.

24 lessons · Published by Jainik · Last updated

1. TypeScript from zero

  1. 1. TypeScript From Zero · 20 min
    Why TypeScript, and Your First Project

    What TypeScript is and is not, why types are erased at runtime, setting up a project, a tsconfig explained line by line, and reading your first compiler errors.

  2. 2. TypeScript From Zero · 22 min
    Basic Types, Inference and Narrowing

    Primitives, unions, literal types, any versus unknown versus never, inference, narrowing and discriminated unions.

  3. 3. TypeScript From Zero · 22 min
    Objects, Interfaces, Type Aliases and Classes

    Object types, interface versus type, structural typing, excess-property checks, classes, enums versus unions, as const and satisfies.

  4. 4. TypeScript From Zero · 24 min
    Functions and Generics

    Function types, overloads, this parameters, generics and constraints, a typed fetch wrapper and a typed event emitter.

  5. 5. TypeScript From Zero · 28 min
    Utility, Mapped and Conditional Types

    Built-in helper types, mapped and conditional types, infer, template literal types, and when not to be clever.

  6. 6. TypeScript From Zero · 30 min
    TypeScript with React, Node and Runtime Validation

    Typed React and Express, plus Zod validation and branded types, because types vanish at runtime.

  7. 7. TypeScript From Zero · 25 min
    Common Errors, Strictness Migration and Reading Error Messages

    Reading long errors bottom-up, the common error codes, and a measured step-by-step migration to strict mode.

2. How React really works

  1. 8. Senior Frontend Depth · 18 min
    React Rendering Model: Render, Commit, Reconciliation and Keys

    What “render” really means, how React finds what changed between renders, why keys matter and how batching works.

  2. 9. Senior Frontend Depth · 18 min
    Hooks in Depth: Effects, Refs and the Rules

    Effect dependencies, stale closures, useRef vs state, useLayoutEffect and the idea behind “You Might Not Need an Effect”.

  3. 10. Senior Frontend Depth · 20 min
    Concurrent React, Suspense and Server Components in Next.js

    Transitions, Suspense boundaries, streaming SSR, hydration errors and the line between server and client components.

  4. 11. Senior Frontend Depth · 15 min
    State Management Decisions: Local, Context, Server Cache, Global Store

    How to sort state into kinds (UI, server, URL, form) and pick a tool for each kind, instead of arguing about libraries.

3. Performance and the browser

  1. 12. The Browser Contract · 18 min
    Browser Rendering and the Event Loop in Practice

    Parse, style, layout, paint and composite. Also layout thrashing, and where tasks, microtasks and requestAnimationFrame fit.

  2. 13. The Browser Contract · 18 min
    Core Web Vitals for Engineers: LCP, INP and CLS

    What each metric measures, its “good” limit at the 75th percentile, why INP replaced FID, and the difference between field data and lab data.

  3. 14. Scenario Debugging · 18 min
    Unnecessary Re-renders: Finding and Fixing Them

    The React Profiler, context updates that re-render every consumer, props that change each time, using memo on purpose and not everywhere, and what the React Compiler changes.

  4. 15. Scenario Debugging · 18 min
    Slow First Load: Bundles, Code Splitting and LCP

    Bundle analysis, code splitting by route, image optimisation, font loading, preload and preconnect, and Server Components with streaming.

4. Testing and quality

  1. 16. Senior Frontend Depth · 15 min
    Frontend Testing Strategy: Unit, Integration, E2E and What to Skip

    Test what users see, not how the code is built. Mock the network, not your modules. Keep end-to-end tests for the key flows only.

  2. 17. Testing From Zero · 13 min
    Testing UI Components with Testing Library

    Queries by role, user-event, async UI, mocking the network with MSW, forms and error states.

  3. 18. Testing From Zero · 17 min
    End-to-End Tests with Playwright, and Fixing Flaky Tests

    Playwright locators, auto-waiting, traces and isolation, with four flaky tests reproduced and fixed.

  4. 19. Senior Frontend Depth · 12 min
    Accessibility Essentials Interviewers Check

    Semantic HTML first, focus in modals, ARIA only when needed, and testing with the keyboard.

5. Interview questions

  1. 20. Full-Stack Questions · 31 min
    TypeScript Interview Questions

    Generics, narrowing, utility types, tsconfig flags, typing React and APIs, and the errors that confuse people.

  2. 21. Full-Stack Questions · 36 min
    React Interview Questions

    Component design, hooks, rendering cost, forms, data fetching, React 19, and code-review style questions.

  3. 22. Full-Stack Questions · 34 min
    Next.js Interview Questions

    App Router, Server and Client Components, caching, Server Actions, proxy, rendering modes and deployment.

  4. 23. Full-Stack Questions · 36 min
    State and Data Libraries in Depth

    Redux Toolkit, TanStack Query v5, Zustand and Jotai, server state vs client state, optimistic updates, hydration with the App Router, forms with Zod.

  5. 24. Senior Frontend Depth · 20 min
    Advanced TypeScript for Interviews: Generics, Narrowing, Utility and Conditional Types

    Generic constraints, discriminated unions, infer, mapped types, satisfies, and keeping API response types correct from the server to the UI.

More reading orders are on the guides page, and every series is listed on the home page.