PracHub
QuestionsLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Ramp

Build a Wordle-Style Game in React

Last updated: Jul 18, 2026

Quick Overview

Build a five-guess Wordle-style game in React with clean state ownership and terminal win or loss behavior. Cover duplicate-letter scoring, keyboard input, accessibility, component boundaries, immutable updates, and focused tests.

  • medium
  • Ramp
  • Software Engineering Fundamentals
  • Frontend Engineer

Build a Wordle-Style Game in React

Company: Ramp

Role: Frontend Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Take-home Project

# Build a Wordle-Style Game in React Build a small Wordle-style game from scratch in React. The secret is a five-letter word, and the player has at most five submitted guesses. Show a five-row board, let the player type only letters, normalize input to uppercase, and color each submitted letter as exact, present in another position, or absent. Display a win or loss state and prevent further submissions when the game ends. ### Constraints & Assumptions - A guess must contain exactly five letters before it can be submitted. - Duplicate letters must be scored correctly: a secret letter occurrence can match at most one guessed occurrence. - The current, unsubmitted guess appears in the next available row without score colors. - State should have one clear owner and derived values should not be stored redundantly. ### Clarifying Questions to Ask - Must guesses be validated against a dictionary? - Should input support the physical keyboard, an on-screen keyboard, or both? - Are accessibility labels, focus behavior, and reduced motion in scope? - Should a new-game action choose a new word or replay the same one? ### Solving Hints Define the game state before defining components. Score exact-position matches before other present-letter matches so duplicate letters do not consume the same secret occurrence twice. ### What a Strong Answer Covers - Minimal, well-owned React state and clean component boundaries for app, board, row, cell, and input. - Correct duplicate-letter scoring and immutable state transitions. - Validation, terminal-state handling, stable keys, and accessible status feedback. - Tests for scoring, repeated submissions, empty rows, wins, and the final failed guess. - Awareness of limitations in a quick implementation, such as hard-coded secrets or missing dictionary validation. ### Follow-up Questions - How would you expose the same score information without relying on color? - How would you persist and restore a game across page reloads? - How would you fetch a daily secret without exposing future answers to the client?

Quick Answer: Build a five-guess Wordle-style game in React with clean state ownership and terminal win or loss behavior. Cover duplicate-letter scoring, keyboard input, accessibility, component boundaries, immutable updates, and focused tests.

Related Interview Questions

  • Design a Tunable Recurring-Transaction Detector - Ramp (hard)
  • Build a Resilient Chain of Clue-Driven HTTP Requests - Ramp (hard)
  • Implement Spreadsheet Cells with Dependencies - Ramp (medium)
  • Implement a Single-Screen Tic-Tac-Toe Game with State Management - Ramp (medium)
|Home/Software Engineering Fundamentals/Ramp

Build a Wordle-Style Game in React

Ramp logo
Ramp
Jul 17, 2026, 12:00 AM
mediumFrontend EngineerTake-home ProjectSoftware Engineering Fundamentals
2
0

Build a Wordle-Style Game in React

Build a small Wordle-style game from scratch in React. The secret is a five-letter word, and the player has at most five submitted guesses. Show a five-row board, let the player type only letters, normalize input to uppercase, and color each submitted letter as exact, present in another position, or absent. Display a win or loss state and prevent further submissions when the game ends.

Constraints & Assumptions

  • A guess must contain exactly five letters before it can be submitted.
  • Duplicate letters must be scored correctly: a secret letter occurrence can match at most one guessed occurrence.
  • The current, unsubmitted guess appears in the next available row without score colors.
  • State should have one clear owner and derived values should not be stored redundantly.

Clarifying Questions to Ask Guidance

  • Must guesses be validated against a dictionary?
  • Should input support the physical keyboard, an on-screen keyboard, or both?
  • Are accessibility labels, focus behavior, and reduced motion in scope?
  • Should a new-game action choose a new word or replay the same one?

Solving Hints

Define the game state before defining components. Score exact-position matches before other present-letter matches so duplicate letters do not consume the same secret occurrence twice.

What a Strong Answer Covers Guidance

  • Minimal, well-owned React state and clean component boundaries for app, board, row, cell, and input.
  • Correct duplicate-letter scoring and immutable state transitions.
  • Validation, terminal-state handling, stable keys, and accessible status feedback.
  • Tests for scoring, repeated submissions, empty rows, wins, and the final failed guess.
  • Awareness of limitations in a quick implementation, such as hard-coded secrets or missing dictionary validation.

Follow-up Questions Guidance

  • How would you expose the same score information without relying on color?
  • How would you persist and restore a game across page reloads?
  • How would you fetch a daily secret without exposing future answers to the client?
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Ramp•More Frontend Engineer•Ramp Frontend Engineer•Ramp Software Engineering Fundamentals•Frontend Engineer Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.