Recap of the Project and Further Learning
Recap and Conclusion
Congratulations on making your journey this far!
Learning Outcome
From this stopwatch project, you have gained a lot of valuable knowledge in the topics
- React JS components
- Use state functions
- Use Effect function
- Use Ref function
- Adding styles to the component
- Your first GitHub commit
- Deploying the project
MCQs
Let’s recap the important concepts with MCQs.
1. What is the primary purpose of the useState hook in React?
A. To fetch data from an API
B. To add state to functional components
C. To manipulate the DOM
D. To create class components
Answer: B. To add state to functional components
2. What does the useRef hook return?
A. A constant value that updates the DOM
B. A new state variable
C. A mutable object that persists across renders
D. A reference to the parent component
Answer: C. A mutable object that persists across renders
3. What is the correct syntax to initialize a state variable using useState?
A. const state = useState(initialValue);
B. let [value] = useState(initialValue);
C. const [value, setValue] = useState(initialValue);
D. useState(value, setValue) = initialValue;
Answer: C. const [value, setValue] = useState(initialValue);
4. What is a component in React JS?
A. A database model used in React applications
B. A reusable piece of UI built using JavaScript and JSX
C. A server-side rendering function
D. A function that directly accesses the operating system
Answer: B. A reusable piece of UI built using JavaScript and JSX
Thank you!
Course
If you want to learn more about React JS and Full-stack development, consider enrolling in GUVI’s Full-stack development course that teaches you everything from scratch and equips you with all the necessary knowledge!


