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 "findNodeHandle inside its render()" False Positive Warning #29627

Merged
merged 1 commit into from
May 29, 2024

Conversation

yungsters
Copy link
Contributor

This was missed in #29038 when unifying the "owner" abstractions, causing findNodeHandle to warn even outside of render() invocations.

Copy link

vercel bot commented May 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2024 0:42am

@react-sizebot
Copy link

Comparing: a9a0106...84ac565

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.66 kB 6.66 kB = 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 496.38 kB 496.38 kB = 88.84 kB 88.84 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.67 kB 6.67 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 501.20 kB 501.20 kB = 89.53 kB 89.53 kB
facebook-www/ReactDOM-prod.classic.js = 593.81 kB 593.81 kB = 104.45 kB 104.45 kB
facebook-www/ReactDOM-prod.modern.js = 570.20 kB 570.20 kB = 100.85 kB 100.85 kB
test_utils/ReactAllWarnings.js Deleted 63.65 kB 0.00 kB Deleted 15.90 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 63.65 kB 0.00 kB Deleted 15.90 kB 0.00 kB

Generated by 🚫 dangerJS against 84ac565

Copy link
Contributor

@josephsavona josephsavona left a comment

Choose a reason for hiding this comment

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

Is it possible to add a test?

@yungsters
Copy link
Contributor Author

Probably, but let me merge this first (to unbreak React Native) and follow up with another PR to add a test.

@yungsters yungsters merged commit 3b29ed1 into facebook:main May 29, 2024
40 checks passed
@yungsters yungsters deleted the find-node-handle branch May 29, 2024 03:36
github-actions bot pushed a commit that referenced this pull request May 29, 2024
This was missed in #29038 when
unifying the "owner" abstractions, causing `findNodeHandle` to warn even
outside of `render()` invocations.

DiffTrain build for commit 3b29ed1.
yungsters added a commit that referenced this pull request Aug 12, 2024
## Summary

As promised on #29627, this
creates a unit test for the `findNodeHandle` error that prevents
developers from calling it within render methods.

## How did you test this change?

```
$ yarn test ReactFabric-test.internal.js
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants