惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
罗磊的独立博客
B
Blog
博客园_首页
A
About on SuperTechFans
有赞技术团队
有赞技术团队
V
V2EX
U
Unit 42
I
InfoQ
IT之家
IT之家
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
H
Help Net Security

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I Revived A 4-Year-Old Abandoned React Quiz App
Temisan · 2026-05-24 · via DEV Community
Cover image for I Revived A 4-Year-Old Abandoned React Quiz App

Temisan

GitHub “Finish-Up-A-Thon” Challenge Submission

This is a submission for the GitHub Finish-Up-A-Thon Challenge

What I Built

I revived a 4-year-old React quiz app I abandoned on GitHub.

It had been sitting untouched for years... broken, incomplete, and barely functional. When I fired it up, it didn't even make it past the loading screen.

Quiz App Loading Screen

Sigh... I expected this anyway.

I opened my browser console and, voila, I found a couple of errors:

  • 429 Too Many Requests from the OpenTDB API
  • Cannot read properties of undefined (reading 'map') — the app was calling .map() on a failed API response

Browser console errors

The API kept firing on every render with no error handling anywhere, while the spinner just ran forever. A classic codebase built by a wannabe self-taught junior developer with limited understanding of JavaScript fundamentals.


Demo

Quizzy results screen

The Comeback Story

And yeah... that was the starting point.

First thing I did was slow down and actually trace what was breaking.

In api.ts, I refactored the request logic:

  • Added a response.ok check so 429 errors don't silently pass through
  • Guarded data.results with Array.isArray before mapping over it
  • Wrapped startTrivia in a proper try/catch/finally so the loading state always resets, even when the API fails

That alone stopped the infinite loading spinner that made the app unusable.

Next up was the actual gameplay. The original version didn't really feel like a complete quiz app. It just started and ended without feedback. It was boring, to say the least.

Old UI with stock photo background

So I added:

  • A difficulty selector (Easy, Medium, Hard)
  • A proper results screen with score feedback
  • A "Finish Quiz" state so users know when they're done
  • Small sound effects for interactions to make it feel more responsive

The old UI was functional but, to be honest, it didn't match what the idea of the app was supposed to be. So I replaced it with a darker aesthetic, a more eccentric trivia-styled theme, and glassmorphism cards to make the content stand out.

New Quizzy UI mid-quiz


My Experience with GitHub Copilot

Copilot helped most during cleanup and refactoring.

It was useful for spotting repetitive patterns and suggesting safer ways to handle async API calls. A few times it pointed out edge cases around response handling that I hadn’t fully considered.

I didn’t just follow it blindly, but it definitely sped things up when I was tightening the data flow and fixing the loading logic.

At one point it suggested checking Array.isArray(data.results) before mapping — which ended up preventing a silent crash I had completely overlooked.


It's not a perfect app... but it's a finished one, and that's the point.