Loading

Quipoin Menu

Learn • Practice • Grow

react / State vs Props in React
mcq
Direction: Choose the correct option

Q1.

What is the main difference between props and state?
A. Props are for functions, state for classes
B. Props are read-only, state can be changed
C. Props are immutable, state is mutable
D. Props are internal, state is external
Direction: Choose the correct option

Q2.

Which of the following can be changed by the component itself?
A. Neither
B. Both
C. State
D. Props
Direction: Choose the correct option

Q3.

Are props passed from parent to child?
A. Only in class components
B. Yes
C. No
D. Only in functional components
Direction: Choose the correct option

Q4.

If a parent component re-renders and passes new props, what happens to the child?
A. Child never re-renders
B. Child unmounts
C. Child may re-render depending on shouldComponentUpdate or memo
D. Child always re-renders
Direction: Choose the correct option

Q5.

Which one is used to store data that may change over time within a component?
A. Refs
B. Props
C. State
D. Context