Skip to content

Update index.js#120

Closed
everettbu wants to merge 1 commit into
mainfrom
patch-1-34136
Closed

Update index.js#120
everettbu wants to merge 1 commit into
mainfrom
patch-1-34136

Conversation

@everettbu

@everettbu everettbu commented Dec 12, 2025

Copy link
Copy Markdown

Mirror of facebook/react#34136
Original author: adriancuadrado


https://github.com/facebook/react/blob/3958d5d84b3d3e6ae5c1caef9c8cf0dc58e862e6/packages/react-devtools-extensions/src/main/reactPolling.js#L79-L82

Attemps start every 0.5s, therefore the comment is wrong.

Summary

The comment was wrong so I fixed it.

How did you test this change?

I didn't really test this change. It's just a change in a comment, it shouldn't break anything.

https://github.com/facebook/react/blob/3958d5d84b3d3e6ae5c1caef9c8cf0dc58e862e6/packages/react-devtools-extensions/src/main/reactPolling.js#L79-L82

```js
// Start next attempt in 0.5s
return new Promise(r => setTimeout(r, 500)).then(() =>
  poll(attempt + 1),
);
```

Attemps start every 0.5s, therefore the comment is wrong.
@greptile-apps

greptile-apps Bot commented Dec 12, 2025

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

Corrected an inaccurate comment in the React DevTools extension initialization code. The polling mechanism attempts to detect React on a page 5 times with 0.5-second intervals (as confirmed in reactPolling.js:80), totaling ~2.5 seconds, not ~5 seconds as the old comment stated.

  • Fixed timing comment from "~5 seconds" to "~2.5 seconds" to accurately reflect the polling duration

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change only corrects a comment to reflect the actual behavior of the code, with no logic or functional changes
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
packages/react-devtools-extensions/src/main/index.js 5/5 Fixed incorrect comment about polling duration (5 seconds → 2.5 seconds)

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@everettbu everettbu added the Resolution: Stale Automatically closed due to inactivity label Feb 4, 2026
@everettbu

Copy link
Copy Markdown
Author

Upstream PR was closed or merged. Code is synced via branch mirror.

@everettbu everettbu closed this Feb 5, 2026
@everettbu
everettbu deleted the patch-1-34136 branch February 5, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Resolution: Stale Automatically closed due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants