# Refactoring React Component Hierarchies to Eliminate Prop Drilling

DevFeed: [Refactoring React Component Hierarchies to Eliminate Prop Drilling](<https://devfeed.tech/articles/refactoring-react-component-hierarchies-to-eliminate-prop-drilling-120787.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.01376>)

Author: Vangelis Gkinis, Vassilis E. Zafeiris

Published: 2026-11-06T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [Static code analysis](<https://devfeed.tech/topics/static-code-analysis.md>), [Front end](<https://devfeed.tech/topics/frontend.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [code-smell](<https://devfeed.tech/tags/code-smell.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [component](<https://devfeed.tech/tags/component.md>), [composition](<https://devfeed.tech/tags/composition.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [data](<https://devfeed.tech/tags/data.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [front-end](<https://devfeed.tech/tags/front-end.md>), [hierarchy](<https://devfeed.tech/tags/hierarchy.md>), [multiple](<https://devfeed.tech/tags/multiple.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [properties](<https://devfeed.tech/tags/properties.md>), [react](<https://devfeed.tech/tags/react.md>), [react-component](<https://devfeed.tech/tags/react-component.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [research](<https://devfeed.tech/tags/research.md>), [size](<https://devfeed.tech/tags/size.md>), [static](<https://devfeed.tech/tags/static.md>), [static-analysis](<https://devfeed.tech/tags/static-analysis.md>), [strategies](<https://devfeed.tech/tags/strategies.md>)

## AI overview

ReactRefactor is a Node.js command-line tool that uses static analysis to identify prop drilling and offers automated refactoring via the Context API or component composition. In a benchmark of open-source React applications, prop drilling occurred frequently across projects regardless of size. Propagation depth was generally low to moderate, while forwarding multiple properties along the same path was a more common source of complexity. The evaluation found that 76.3% of instances could potentially be eliminated automatically, primarily through Context API refactoring.

## Source excerpt

arXiv:2610.01376v2 Announce Type: replace Abstract: In React front-end development, Prop Drilling is the practice of propagating data through component properties across multiple levels of the component hierarchy. Despite being discouraged by React documentation and characterized as a code smell by recent research, little is known about its prevalence, complexity, and potential for automated refactoring. In this work, we propose a static analysis method for identifying Prop Drilling instances in a React codebase and eliminating them using two automated refactoring strategies based on Context API and Component Composition. The proposed method is implemented as a Node\.js command line tool, ReactRefactor, and empirically evaluated on a benchmark dataset of open-source React applications. The main findings of the empirical evaluation indicate (a) the frequent occurrence of prop drillings across benchmark projects, irrespective of project size; (b) their generally low to moderate complexity in terms of data propagation depth, contrasted with the more prevalent complexity arising from the simultaneous forwarding of multiple properties along the same path; and, (c) the potential for automated elimination of a substantial share (76.3%) of prop drillings, primarily through refactoring to the Context API.