--:--









Quiz for Props and State

Course: REACT | Subject: React | Topic: Components



Logo

Q1: What is the main purpose of props in React?

Logo

Q2: Which React feature allows a component to maintain its own data?

Logo

Q3: Props in React are ______.

Logo

Q4: Which of the following is used to update a component’s state?

Logo

Q5: In a functional component, how is state introduced?

Logo

Q6: Props are received as a ______ in functional components.

Logo

Q7: Can props be modified inside the child component?

Logo

Q8: Which of the following is true about state in React?

Logo

Q9: How are props passed to a child component?

Logo

Q10: Which method is called after state is updated in a class component?

Logo

Q11: What happens when state is updated?

Logo

Q12: Which hook is used to access props in functional components?

Logo

Q13: Which is better for dynamic component behavior?

Logo

Q14: In React, how many times can props be set inside a component?

Logo

Q15: Which keyword is used to define state in a class component?

Logo

Q16: How can default props be set for a component?

Logo

Q17: When are props available inside a class component?

Logo

Q18: What type of data can be passed via props?

Logo

Q19: Which hook replaces this.setState in functional components?

Logo

Q20: Which lifecycle method is commonly used to fetch data that updates state?

Are you ready to start test? Set your time limit