GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add isArray in devTools utils by behnammodi · Pull Request #22438 · react/react

Conversation

@behnammodi

@behnammodi behnammodi commented Sep 27, 2021

Copy link
Copy Markdown
Contributor

Also here I replaced Array.isArray with isArray from 'shared' package

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@behnammodi
Add isArray in devTools utils
6fa3aab
@facebook-github-bot facebook-github-bot added the CLA Signed label Sep 27, 2021
@bvaughn bvaughn self-assigned this Sep 27, 2021
@bvaughn

bvaughn commented Sep 27, 2021

Copy link
Copy Markdown
Contributor

When Sebastian landed this in #21188, he confirmed that the Closure compiler inlines the wrapper function. Unfortunately DevTools doesn't use the same compilation process, and as a result, the wrapper/indirection doesn't get inlined.

Maybe longer term, we should look into running Closure compiler over DevTools builds as well– but in the short term, I'm not sure the added benefits from this change are worth the extra wrapper.

Maybe we could use a similar approach as shared/hasOwnProperty for DevTools (e.g. react-devtools-shared/src/isArray) and just export the function directly?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@behnammodi

behnammodi commented Sep 27, 2021

Copy link
Copy Markdown
Contributor Author

Yes, I agree, I will do it

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@behnammodi
use devtool own isArray
1767f75
@behnammodi

behnammodi commented Sep 27, 2021

Copy link
Copy Markdown
Contributor Author

@bvaughn Done

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bvaughn
bvaughn reviewed Sep 27, 2021
View reviewed changes
Comment thread packages/react-devtools-shared/src/isArray.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@behnammodi
remove wrapper function
6cc291d
bvaughn
bvaughn approved these changes Sep 27, 2021
View reviewed changes

@bvaughn bvaughn left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

👍🏼 Thanks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

behnammodi reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bvaughn

bvaughn commented Sep 27, 2021

Copy link
Copy Markdown
Contributor

I'm not sure why CI isn't properly running on your PR. Each time you push, it looks like only the CLA check and Code Sandbox run.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@behnammodi

behnammodi commented Sep 27, 2021

Copy link
Copy Markdown
Contributor Author

I'm not sure why CI isn't properly running on your PR. Each time you push, it looks like only the CLA check and Code Sandbox run.

Yes, this is exactly my question, maybe CI knows me :)

bvaughn reacted with laugh emoji
All reactions
  • 😄 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bvaughn
bvaughn approved these changes Sep 27, 2021
View reviewed changes

@bvaughn bvaughn left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It's fine. This change seems safe, and I ran the tests locally on your branch. Not sure why CI is not cooperating.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

behnammodi reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bvaughn
bvaughn merged commit 580e2f5 into react:main Sep 27, 2021
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
@behnammodi @zhengjitf
Add isArray in devTools utils (react#22438)
6528614
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
@behnammodi
Add isArray in devTools utils (react#22438)
0fe63d5
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@behnammodi
Add isArray in devTools utils (react#22438)
2e65621
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@bvaughn bvaughn bvaughn approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@bvaughn bvaughn

Labels

CLA Signed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@behnammodi @bvaughn @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.