useQuiz



Objective
useQuiz is a modern quiz application built with React and TypeScript. It showcases state management, modular component design, and provides an engaging, interactive user experience for learning and assessment purposes, or casual entertainment.
Tools & Technologies
Project Links
- Live Demo: See It in Action
- Source Code: View Code on GitHub
Challenge
Managing state transitions for loading, error, and quiz progress was a challenge. I opted for useReducer to centralize state logic, which made the application easier to maintain and scale.
Integrating error states and ensuring graceful degradation when the API failed required careful handling of asynchronous calls with try-catch blocks and user-friendly error messages.
Ensuring the application adhered to strict TypeScript rules required defining precise interfaces for State, Action, and QuestionType. This improved code reliability and reduced bugs.