Loading

Quipoin Menu

Learn • Practice • Grow

react / Lifting State Up in React
mcq
Direction: Choose the correct option

Q1.

What does 'lifting state up' mean in React?
A. Moving state to a global store
B. Moving state to a higher-level component to share it with siblings
C. Removing state from components
D. Using state in a parent component only
Direction: Choose the correct option

Q2.

Why would you lift state up?
A. To allow multiple sibling components to share and sync data
B. To avoid props
C. To reduce re-renders
D. To make state local
Direction: Choose the correct option

Q3.

How do sibling components communicate after lifting state up?
A. They cannot communicate
B. Through callbacks passed from the parent
C. Using global events
D. Directly via props
Direction: Choose the correct option

Q4.

Consider two sibling components that need to share input values. Where should the state live?
A. In a context
B. In each component
C. In a global store
D. In their common parent
Direction: Choose the correct option

Q5.

What is the direction of data flow when state is lifted up?
A. No flow
B. From child to parent only
C. Bidirectional
D. From parent to child via props, and child to parent via callbacks