← All videos

Engineering video

31:45 · 4 June 2026

Senior Engineer vs. Claude Code | React.js Interview (useEffect, Suspense, RSC, a11y)

Chapters 5 sections

  1. 0:00Introduction and Installing the Claude Code Skill
  2. 2:00React Interview Questions: State, Derived State, and Context
  3. 4:00Performance, UseCallback, and Data Fetching
  4. 12:00Headless Components and Browser Architecture

Key concepts in this video:

1. Rule of Hooks

Hooks must be placed at the very top of the component following an early return pattern according to the rules of hooks.

Watch section from 2:00 →

2. Derived State and UseMemo

Computing totals directly during render or utilizing use memo rather than using an effect and extra state avoids unnecessary re-renders.

Watch section from 2:00 →

3. Context Splitting

Split global contexts by update frequency so that high-frequency updates like mouse positions use a dedicated provider to prevent tree-wide re-renders.

Watch section from 4:00 →

4. UseCallback Overhead

Using use callback on a function passed to a plain DOM element button is pure overhead when the parent component recreates the function reference on re-renders.

Watch section from 4:00 →

5. Data Fetching Libraries

Using specialized data fetching libraries like TanStack Query handles caching, duplication, and refetching out of the box compared to manual useEffect implementations.

Watch section from 10:23 →

6. Headless Components

A headless component hook exposes behavior via hooks while letting consumers bring their own markup and styling, offering high flexibility for accessible UI patterns.

Watch section from 12:00 →

7. Compositor Thread vs Main Thread

Pushing visual transformations to CSS transitions runs animations directly on the compositor thread and GPU, bypassing the busy main thread.

Watch section from 15:49 →

8. Accessibility in Custom Elements

Using non-semantic elements like a div with an onclick handler creates major accessibility issues because they lack keyboard operability and assistive tech support.

Watch section from 20:32 →

9. Finite State Machines

Managing complex multi-step flows with illegal transitions requires a finite state machine rather than a handful of booleans or race-prone state variables.

Watch section from 22:00 →

10. State Placement

Pushing frequently changing state like row hover IDs down to the local component level prevents unnecessary page-level re-renders.

Watch section from 24:25 →

Transcript

Today, we're going to go to a senior React technical interview. But the catch is that Bogdan will be interviewed by Cloud Code itself. And how are we going to do this? Using the senior dev skill, we just launched. You folks can see the repo over here. But Bogdan, let's go and get the senior dev skill and we're going to use that to interview you on. I think it's 10 questions, right? Yes. So I'm going to copy this. Okay, so I will install the skill now and you can get the command from the public repository. I'll click yes. So, make sure you check this board by pressing space, hit enter, I use Cloud Code and I'm installing it globally as a symlink and with VS. And then you can go into Cloud and yeah, I'm going to click yes, it has that folder. And you get it by typing react senior interview. So basically, we build this with all the react documentation and then react best practices that we learned over the years, like the rules of hooks, state architecture, performance, and the typical flaws. And also then we injected some interview questions, so it looks very similar to what you get in real interviews. Gotcha. So, what is going to do right now? It seems like it's loading everything and it's going to start asking you which which level you're interviewing for, right? Exactly. So I will start on a hard one, I'm going to hit for the senior level. Let's see. And now it's going to ask me what kind of if you want a more focus interview. And I will go for broad, which is a little bit of everything, state management, web performance, accessibility. And now it's good to start asking me the questions and at the end we see how many I got right and what are my gaps. What's funny is that we also offer a senior technical assessment, right, and you folks are going to find the link in comments. And that assessment, it's much more deterministic, right? Because you have a set of questions and you're going to see how you're going to rank against other developers, right? And the outcome, it's always the same is it right or wrong, etc. But in the case of cloud code, the model, it's not so