Till now data management or state management in React has been component-specific. When it comes to sharing the state between 2 different nodes in the React DOM tree we can do that by lifting the state up as shown in the previous lesson.
This becomes a matter of concern if we have a DOM tree like the one given below:
Let’s say there’s a state variable set by the J node which has to be used by the H node, in this case lifting the state up will have to go through multiple levels which leads us to the problem of prop drilling.
Prop drilling is the problem where we have to pass the prop multiple levels. In this case, we can use Redux or context API.