Module quiz: Data and state :React Basics (Meta Front-End Developer Professional Certificate) Answers 2025
1. React data flows one way: parent → child
✔️ True
❌ False
2. Why is one-way data flow important?
✔️ It ensures that the data is flowing from top to bottom in the component hierarchy.
❌ It ensures data flows bottom to top.
3. State is data inside a component that it can mutate
✔️ True
❌ False
4. What is prop drilling?
✔️ Passing data parent → child → grandchild → … to deeper levels
❌ Passing data child → parent → ancestor
5. Stateless components don’t have state
✔️ True
❌ False
6. Correct statement about props
❌ Props are mutable
✔️ Props are immutable (you should never change them)
7. Is this code valid?
✔️ Yes
❌ No
(Button uses onClick={handler} → completely valid)
8. Is this code valid?
✔️ Yes
❌ No
(Inline arrow function is also valid)
9. Correct statement about useState
✔️ … lets you hook into React state and lifecycle features from a component.
❌ … imported from third-party
❌ … update function must follow a naming rule
❌ … should never be called at top level
10. Context API allows you to:
✔️ Avoid passing state down through many levels (avoid prop drilling)
❌ Avoid return statement
❌ Avoid modularity
📘 Summary Table
| Q | Correct Answer |
|---|---|
| 1 | True |
| 2 | Top-to-bottom data flow |
| 3 | True |
| 4 | Passing props through multiple nested children |
| 5 | True |
| 6 | Props are immutable |
| 7 | Yes |
| 8 | Yes |
| 9 | useState lets you hook into React state |
| 10 | Avoid prop drilling |