← All videos

Engineering video

22:53 · 10 September 2024

React.js Live Coding Mock Interview 2025 (Build A Recursive List - Advanced State Management)

Chapters 6 sections

  1. 0:00Introduction and Problem Statement
  2. 0:32Requirements Analysis and Wireframing
  3. 6:11Component Structure and Semantic HTML
  4. 7:08Implementing Recursion in React

Key concepts in this video:

1. Problem Requirements and Data Analysis

Reviewing the JSON schema to understand a multi-level nested topic structure, clickable bubbles, and optional requirements like subtopic counts and active status.

Watch section from 0:32 →

2. Visualizing and Wireframing

Using drawing software (like TL draw) to map out component structures and communicate the approach to the interviewer before writing code.

Watch section from 2:00 →

3. Semantic HTML, SEO, and Accessibility

Emphasizing the use of semantic HTML elements to ensure components are out-of-the-box accessible and SEO-ready.

Watch section from 6:17 →

4. Recursive Component Implementation

Extracting a topic render function that calls itself recursively to handle an undefined depth of nested subtopics.

Watch section from 7:21 →

5. Tooling and Debugging

Using the React browser debugger instead of console logs to inspect props and state during development and troubleshooting.

Watch section from 11:30 →

6. State Management for Collapsible Elements

Adding local component state using React's useState hook to track whether a topic bubble is expanded or collapsed upon clicking.

Watch section from 12:00 →

7. Conditional Styling and Optional Requirements

Implementing conditional rendering and dynamic styling based on topic enable status and displaying subtopic counts.

Watch section from 14:00 →

8. Code Review, Performance, and Testing

Reviewing own code to add missing list keys, discuss aria attributes for accessibility, consider React.memo for performance, and evaluate unit testing approaches.

Watch section from 16:00 →

Transcript

Hi folks, today together with Bogdan, we are going to solve a mock interview. This is a real senior front-end interview question that one of our mentees got. And the funny thing, the interesting aspect of this question is that it combines hands-on react front-end knowledge with algorithmic and data structures knowledge. Which happens to be more and more common in live coding interviews, particularly in the US and European market.