This document contains the source code for a simple quiz app built with React. It defines an App component with state to track the current question, score, and whether the quiz has finished. An array of questions is defined with text and multiple choice options. Clicking an option updates the score and advances the question, or ends the quiz. A restart function resets the state to restart the quiz. The component renders either the quiz or final results based on state.
This document contains the source code for a simple quiz app built with React. It defines an App component with state to track the current question, score, and whether the quiz has finished. An array of questions is defined with text and multiple choice options. Clicking an option updates the score and advances the question, or ends the quiz. A restart function resets the state to restart the quiz. The component renders either the quiz or final results based on state.