React Quiz

1. Which method is used to update the state of a React component?

2. What is the primary purpose of React's virtual DOM?

3. Which hook is used to perform side effects in functional components?

4. What is the purpose of props in React?

5. Which tool is commonly used for bundling React applications?

6. What is the purpose of key prop in React lists?

7. Which hook is used to manage local state in functional components?

8. What is JSX in React?

9. Which lifecycle method is called after a component is inserted into the DOM?

10. What is the purpose of React Router?

11. Which hook is used to memoize the result of a function?

12. What is the purpose of refs in React?

13. Which lifecycle method is called before a component is removed from the DOM?

14. What is the purpose of React Context API?

15. Which hook is used to persist values between renders without causing re-renders when changed?

16. What is the purpose of PureComponent in React?

17. Which tool is used for testing React components?

18. What is the purpose of Fragments in React?

19. Which hook is used to create a custom hook?

20. What is the purpose of error boundaries in React?