Import Result
Understand how to import and integrate the Result component into the JavaScript Quiz app. Learn to use props and create a restartHandler function to reset the quiz state. Explore conditional rendering with the ternary operator to display quiz results once the quiz is finished.
We'll cover the following...
We'll cover the following...
Import the result component
We created a component called Result in the previous lesson. We must now import the component, pass the props, and include the restartHandler function.
Create the restartHandler function
As we learned earlier, this function changes the values of setQuizFinished to false, setScore to 0 ...