← All videos

Engineering video

25:21 · 12 March 2025

React.js Mock Interview Live Coding 2025 - Tier 1 Tech Company (Build Google Sheets)

Chapters 5 sections

  1. 0:00Problem Statement and Wireframing
  2. 1:11Component Structure and State Design
  3. 11:08Initial Code Implementation
  4. 15:12Adding Computed Values and Logic

Key concepts in this video:

1. Component Structure and Wireframing

Drawing a low-fidelity UI wireframe helps communicate intentions, clarify dynamic components, and outline the general structure before coding.

Watch section from 1:11 →

2. State Management and Lifting State

State should live as close as possible to where it is used, but when sibling components need access to the same state, it must be lifted up to a parent component.

Watch section from 2:24 →

3. Derived State

Values that can be computed directly from existing state variables should not be stored as separate state, preventing redundancy and unnecessary re-renders.

Watch section from 2:34 →

4. Data Structures for Interconnected Cells

Using a JavaScript object with key-value pairs rather than an array makes cell referencing and address lookups significantly easier.

Watch section from 8:13 →

5. State Mutations

State mutations in UIs typically originate from either backend data synchronization or user interactions, which in this challenge are handled through input on-change events.

Watch section from 9:16 →

6. Brute Force Implementation Strategy

Starting with a simple, hardcoded single-component approach avoids premature abstraction, complex prop drilling bugs, and wasted time during a live interview.

Watch section from 11:08 →

7. Using the React Debugger

Knowing how to use the React debugger to inspect state in real time helps quickly diagnose and fix state issues under interview pressure.

Watch section from 14:09 →

8. Handling Edge Cases After the Core Solution

Developers should prioritize getting a working core solution first, and discuss advanced edge cases like self-references, circular references, and recursion at the end.

Watch section from 22:34 →

Transcript

Today we are going to build a mini Google sheets, this is a senior front end React live coding really interview. For this challenge, I want you to render four cells, respectively labeled A to D. Each cell should contain a text input that the user can type into, if you're familiar with Google sheets, that's how it works. Each cell should also display a number, if the text input contains a number, the cell should render that number.