gaearon/react-state-problem — explained in plain English
Analysis updated 2026-07-17 · repo last pushed 2016-09-26
Study a real example of a React state bug where old UI selections don't reset properly.
Practice debugging why a 'try again' button doesn't fully clear component state.
Use the reproducible quiz flow to test fixes for stale state issues.
Learn common gotchas around resetting state in a React quiz or form app.
| gaearon/react-state-problem | amarjitjim/browserpilot | andershaig/cssess | |
|---|---|---|---|
| Stars | 3 | 3 | 3 |
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | 2016-09-26 | — | 2011-08-19 |
| Maintenance | Dormant | — | Dormant |
| Setup difficulty | easy | moderate | easy |
| Complexity | 1/5 | 3/5 | 1/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
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.
A small React quiz app demo built to reproduce and study a state bug where old answer highlights stick around after retaking the quiz.
Mainly JavaScript. The stack also includes React, JavaScript, Create React App.
Dormant — no commits in 2+ years (last push 2016-09-26).
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.