Menu

Props Drilling in React
πŸ“°

Props Drilling in React

DEV Community: reactΒ·LokeshΒ·about 2 hours ago
#9tXwiWGG
#devtoreact#devto#dev#props#username
Reading 0:00
15s threshold

When building React applications, we use props to pass data from one component to another.

But what happens when we need to pass data through multiple components, even when some of those components don't need that data?

This is called Props Drilling .

Let's understand it with a simple example.

1. What is Props Drilling?

Props Drilling happens when we pass data from a parent component to a deeply nested child component through multiple intermediate components.

In simple words, we pass props through components just to reach another component that actually needs the data.

2.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.