tezvyn:

What is prop drilling in React?

Source: react.devbeginner

WHAT IT TESTS: Awareness of coupling when props tunnel through indifferent layers. ANSWER OUTLINE: Define it as threading props through middle layers; give a three-layer example like a theme toggle; cite useContext. RED FLAG: Using Context for every prop.

WHAT IT TESTS: It checks whether you recognize architectural coupling when state threads through layers that ignore it, creating brittle middle components. ANSWER OUTLINE: A strong answer defines prop drilling as passing data through intermediate components only to reach a deep child; illustrates it with a three-layer example like a user object flowing from App through Layout to Header to reach Avatar; and names useContext as the idiomatic fix.

Read the original → react.dev

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

What is prop drilling in React? · Tezvyn