ReactJs - Prop Drilling

This is one of the commonly asked questions in React Js Interviews. Prop drilling is explained in a simple method in this video.
Prop drilling is considered as a drawback in React Js because the prop is being passed to the deeply nested child component through multiple intermediate components making these intermediate components to have access to the prop which they dont want.
In order to overcome this drawback, React has come up with a concept called 'Context API'

Пікірлер