git404hub

what is react-state-problem fr?

gaearon/react-state-problem — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2016-09-26

3JavaScriptAudience · developerComplexity · 1/5DormantSetup · easy

tl;dr

A small React quiz app demo built to reproduce and study a state bug where old answer highlights stick around after retaking the quiz.

vibe map

mindmap
  root((repo))
    What it does
      Reproduces a bug
      Quiz retake flow
      Stale answer highlights
    Tech stack
      React
      Create React App
    Use cases
      Study React state bugs
      Debug reset logic
      Learn state management
    Audience
      React learners
      Developers
    Flow
      Pick a topic
      Answer questions
      See results
      Try again

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Study a real example of a React state bug where old UI selections don't reset properly.

VIBE 2

Practice debugging why a 'try again' button doesn't fully clear component state.

VIBE 3

Use the reproducible quiz flow to test fixes for stale state issues.

VIBE 4

Learn common gotchas around resetting state in a React quiz or form app.

what's the stack?

ReactJavaScriptCreate React App

how it stacks up fr

gaearon/react-state-problemamarjitjim/browserpilotandershaig/cssess
Stars333
LanguageJavaScriptJavaScriptJavaScript
Last pushed2016-09-262011-08-19
MaintenanceDormantDormant
Setup difficultyeasymoderateeasy
Complexity1/53/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

in plain english

This is a small demo project created to illustrate a bug in a quiz application built with React. The real-world problem: when you take a quiz, answer some questions, see your results, and then click "try again" to retake it, the app sometimes doesn't fully reset. Specifically, the answer choices you selected in the previous attempt stay highlighted on screen even though you're starting fresh. It's a confusing user experience, you'll see old answer highlights mixed in with your new responses. The author created this repo to work through the issue publicly, suspecting they have some mistaken mental models about how React manages state (the internal data that tracks things like "which answer did the user pick?"). The quiz flow is straightforward: you click on a topic called "materials," press start, answer questions randomly until you reach a results screen, then click "try again." If you repeat this cycle a few times, you'll occasionally see the bug where previous answers are still visually marked. The project itself is a standard React application created with Create React App, a tool that sets up a working JavaScript project without needing to manually configure build tools. The README mostly contains the boilerplate documentation from Create React App, information about how to run it locally, deploy it, and manage dependencies. The actual application code isn't detailed in the README, so the focus is on reproducing the problem rather than explaining the solution. This type of repo is useful for learning: it's a contained example of a real bug that a developer can study, debug, and use to understand how state management works in React applications. If you're interested in React and how to avoid these kinds of state-handling gotchas, this would be a good reference to explore.

prompts (copy fr)

prompt 1
Look at this quiz app's try again flow and explain why old answer highlights might persist.
prompt 2
Suggest a fix so that clicking try again fully resets the quiz's selected answers.
prompt 3
Show me how to use a key prop to force React to remount the quiz component on retake.
prompt 4
Explain the difference between resetting state with useState versus remounting the component.

Frequently asked questions

what is react-state-problem fr?

A small React quiz app demo built to reproduce and study a state bug where old answer highlights stick around after retaking the quiz.

What language is react-state-problem written in?

Mainly JavaScript. The stack also includes React, JavaScript, Create React App.

Is react-state-problem actively maintained?

Dormant — no commits in 2+ years (last push 2016-09-26).

How hard is react-state-problem to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is react-state-problem for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.