0 votes
in ReactJS by
What is prop drilling in React?

1 Answer

0 votes
by

Sometimes while developing React applications, there is a need to pass data from a component that is higher in the hierarchy to a component that is deeply nested.

To pass data between such components, we pass props from a source component, and keep passing the prop to the next component in the hierarchy till we reach the deeply nested component.

The disadvantage of using prop drilling is that the components that should otherwise be not aware of the data have access to the data.

Related questions

0 votes
asked Jan 31, 2021 in ReactJS by Robindeniel
0 votes
0 votes
asked Oct 15, 2021 in Petroleum Engineering by Robin
...