Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Model JSX component instantiation as a call #10236

Closed
wants to merge 1 commit into from
Closed

Conversation

nmote
Copy link
Collaborator

@nmote nmote commented May 10, 2024

As noted inline, modeling <Foo x={y}>{bar}</Foo> as Foo({x:y, children: [bar]}) is a reasonably accurate approximation of what actually happens at runtime. It will only work for functional components, but those are common. It will take more work to correctly model older ways of creating React components.

I believe this has no effect on the OSS behavior. It will only affect intraprocedural analysis, so no test results should change here.

Test plan: Automated tests

As noted inline, modeling `<Foo x={y}>{bar}</Foo>` as `Foo({x:y,
children: [bar]})` is a reasonably accurate approximation of what
actually happens at runtime. It will only work for functional
components, but those are common. It will take more work to correctly
model older ways of creating React components.

I believe this has no effect on the OSS behavior. It will only affect
intraprocedural analysis, so no test results should change here.

Test plan: Automated tests
@nmote nmote requested a review from IagoAbal as a code owner May 10, 2024 19:55
Copy link
Contributor

github-actions bot commented May 10, 2024

PR checklist:

  • Purpose of the code is evident to future readers
  • Tests included or PR comment includes a reproducible test plan
  • Documentation is up-to-date
  • A changelog entry was added to changelog.d for any user-facing change
  • Change has no security implications (otherwise, ping security team)

If you're unsure about any of this, please see:

@nmote nmote closed this May 14, 2024
@IagoAbal
Copy link
Collaborator

It will only affect intraprocedural analysis

You mean "inter-procedural" (intra -> inter).

IagoAbal pushed a commit that referenced this pull request May 16, 2024
…prietary#1510)

As noted inline, modeling `<Foo x={y}>{bar}</Foo>` as `Foo({x:y,
children: [bar]})` is a reasonably accurate approximation of what
actually happens at runtime. It will only work for functional
components, but those are common. It will take more work to correctly
model older ways of creating React components.

Replaces #10236

Test plan: Automated tests

synced from 413902d50aa48f9877b8ff8dea925d1de5f2e14c
aryx pushed a commit that referenced this pull request May 16, 2024
…prietary#1510)

As noted inline, modeling `<Foo x={y}>{bar}</Foo>` as `Foo({x:y,
children: [bar]})` is a reasonably accurate approximation of what
actually happens at runtime. It will only work for functional
components, but those are common. It will take more work to correctly
model older ways of creating React components.

Replaces #10236

Test plan: Automated tests

synced from 413902d50aa48f9877b8ff8dea925d1de5f2e14c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants