in Technology 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
    I am new to React but I know main concept of unique key. However, I am getting a warning. Below ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    How to create components in React?...
asked Jun 2, 2021 in Technology by JackTerrance
0 votes
    how to pass a value to a react funtion without immediately firing it?...
asked Dec 10, 2020 in Technology by JackTerrance
0 votes
    What are error boundaries in React js?...
asked Dec 5, 2020 in Technology by JackTerrance
0 votes
    What are Higher Order Components in React js?...
asked Dec 5, 2020 in Technology by JackTerrance
0 votes
    How to pass data between react components?...
asked Dec 5, 2020 in Technology by JackTerrance
0 votes
0 votes
    Name a few techniques to optimize React app performance?...
asked Dec 5, 2020 in Technology by JackTerrance
0 votes
    What are the different ways to style a React component?...
asked Dec 5, 2020 in Technology by JackTerrance
0 votes
    What is React Hooks?...
asked Dec 5, 2020 in Technology by JackTerrance
0 votes
    Explain React state and props....
asked Dec 5, 2020 in Technology by JackTerrance
0 votes
    How to prevent re-renders in React?...
asked Dec 5, 2020 in Technology by JackTerrance
0 votes
0 votes
    What are the different lifecycle methods in React?...
asked Dec 5, 2020 in Technology by JackTerrance
0 votes
    What is the virtual DOM? How does react use the virtual DOM to render the UI?...
asked Dec 5, 2020 in Technology by JackTerrance
...