11. What are React components primarily used for?
Answer:Defining the structure of web pages
12. In React, what is a component?
Answer:A functional unit of user interface
13. Which of the following is true about React components?
Answer:They can be nested within other components
14. What is the purpose of the render method in a React component?
Answer:To render the component's UI
15. How can you pass data from a parent component to a child component in React?
Answer:By using props
16. What is the key benefit of using functional components in React?
Answer:They have better performance than class components
17. Which React hook is used for managing state in functional components?
18. What does the term "props" stand for in React?
19. In React, what is the purpose of the constructor method in a class component?
Answer:To initialize component state
20. What is the primary difference between class components and functional components in React?