PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Ramp

Build a simplified Wordle game in React

Last updated: May 21, 2026

Quick Overview

This question evaluates a candidate's competency in React-based front-end development, covering component design, state management, asynchronous HTTP fetching, keyboard and form input handling, UI rendering, and algorithmic game logic such as per-letter feedback and duplicate-letter handling.

  • medium
  • Ramp
  • Coding & Algorithms
  • Software Engineer

Build a simplified Wordle game in React

Company: Ramp

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Take-home Project

## Problem: Implement a simplified Wordle in React Build a small Wordle-like game UI using React. ### Requirements - The game chooses a single **answer word** by fetching it from an HTTP endpoint: - The endpoint URL is obtained from Question 1 (treat it as given here). - Assume the endpoint returns a JSON payload containing the answer word (e.g., `{ "answer": "react" }`) or a plain text word (state your assumption in code). - The answer word length is fixed (commonly 5), and the player has a fixed number of attempts (commonly 6). ### Gameplay - The player enters guesses one row at a time. - On submitting a guess: - If the guess length is not exactly the answer length, show an error or ignore submission. - Otherwise compute per-letter feedback: - **Correct**: letter is in the correct position. - **Present**: letter exists in the answer but in a different position. - **Absent**: letter not in the answer. - Handle duplicate letters correctly (Wordle-style counting). - End conditions: - If the guess equals the answer → player wins, stop accepting further input. - If attempts are exhausted → player loses, reveal the answer. ### UI expectations (flexible, but must be testable) - Render a grid of attempts × word length. - Render current typing state and committed guesses. - Provide either: - an on-screen keyboard, **or** - capture physical keyboard input (letters, Backspace, Enter). ### Deliverable Implement the React component(s) and supporting logic so the game works end-to-end (fetch answer → play rounds → render feedback). ### Notes - You may use React hooks (`useState`, `useEffect`, etc.). - No need for styling beyond what is required for functional rendering.

Quick Answer: This question evaluates a candidate's competency in React-based front-end development, covering component design, state management, asynchronous HTTP fetching, keyboard and form input handling, UI rendering, and algorithmic game logic such as per-letter feedback and duplicate-letter handling.

Related Interview Questions

  • Find User Airport at a Time - Ramp (medium)
  • Find an Exit in a URL Maze - Ramp (medium)
  • Implement a multi-level digital recipe manager - Ramp (medium)
  • Build a Wordle-style game in React - Ramp (medium)
  • Find final URL by crawling until “congrats” - Ramp (hard)
Ramp logo
Ramp
Jan 18, 2026, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
15
0
Loading...

Problem: Implement a simplified Wordle in React

Build a small Wordle-like game UI using React.

Requirements

  • The game chooses a single answer word by fetching it from an HTTP endpoint:
    • The endpoint URL is obtained from Question 1 (treat it as given here).
    • Assume the endpoint returns a JSON payload containing the answer word (e.g., { "answer": "react" } ) or a plain text word (state your assumption in code).
  • The answer word length is fixed (commonly 5), and the player has a fixed number of attempts (commonly 6).

Gameplay

  • The player enters guesses one row at a time.
  • On submitting a guess:
    • If the guess length is not exactly the answer length, show an error or ignore submission.
    • Otherwise compute per-letter feedback:
      • Correct : letter is in the correct position.
      • Present : letter exists in the answer but in a different position.
      • Absent : letter not in the answer.
    • Handle duplicate letters correctly (Wordle-style counting).
  • End conditions:
    • If the guess equals the answer → player wins, stop accepting further input.
    • If attempts are exhausted → player loses, reveal the answer.

UI expectations (flexible, but must be testable)

  • Render a grid of attempts × word length.
  • Render current typing state and committed guesses.
  • Provide either:
    • an on-screen keyboard, or
    • capture physical keyboard input (letters, Backspace, Enter).

Deliverable

Implement the React component(s) and supporting logic so the game works end-to-end (fetch answer → play rounds → render feedback).

Notes

  • You may use React hooks ( useState , useEffect , etc.).
  • No need for styling beyond what is required for functional rendering.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Ramp•More Software Engineer•Ramp Software Engineer•Ramp Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

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

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL 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.