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

[compiler] Type ref prop as a ref #29834

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

josephsavona
Copy link
Contributor

@josephsavona josephsavona commented Jun 10, 2024

Stack from ghstack (oldest at bottom):

Adds a shape type for component props, which has one defined property: "ref". This means that if the ref property exists, we can type usage of props.ref (or via destructuring) the same as the result of useRef() and infer downstream usage similarly.

Copy link

vercel bot commented Jun 10, 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 Jun 10, 2024 4:57pm

josephsavona added a commit that referenced this pull request Jun 10, 2024
ghstack-source-id: a0c061eac26f7fe54c0c902840c9f44f656eb504
Pull Request resolved: #29834
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jun 10, 2024
josephsavona added a commit that referenced this pull request Jun 10, 2024
ghstack-source-id: 5a8395225783df9a2d29892ee39c31af0fc5742c
Pull Request resolved: #29834
@react-sizebot
Copy link

react-sizebot commented Jun 10, 2024

Comparing: a532d91...9f141fa

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 = 497.44 kB 497.44 kB = 89.16 kB 89.16 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 = 502.26 kB 502.26 kB = 89.85 kB 89.85 kB
facebook-www/ReactDOM-prod.classic.js = 596.94 kB 596.94 kB = 105.24 kB 105.24 kB
facebook-www/ReactDOM-prod.modern.js = 571.12 kB 571.12 kB = 101.19 kB 101.19 kB
test_utils/ReactAllWarnings.js Deleted 63.89 kB 0.00 kB Deleted 15.97 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.89 kB 0.00 kB Deleted 15.97 kB 0.00 kB

Generated by 🚫 dangerJS against 9f141fa

Adds a shape type for component props, which has one defined property: "ref". This means that if the ref property exists, we can type usage of `props.ref` (or via destructuring) the same as the result of `useRef()` and infer downstream usage similarly.

[ghstack-poisoned]
josephsavona added a commit that referenced this pull request Jun 10, 2024
Adds a shape type for component props, which has one defined property: "ref". This means that if the ref property exists, we can type usage of `props.ref` (or via destructuring) the same as the result of `useRef()` and infer downstream usage similarly.

ghstack-source-id: 76cd07c5dfeea2a4aafe141912663b097308fd73
Pull Request resolved: #29834
@josephsavona josephsavona merged commit 9f141fa into gh/josephsavona/28/base Jun 10, 2024
55 checks passed
josephsavona added a commit that referenced this pull request Jun 10, 2024
Adds a shape type for component props, which has one defined property: "ref". This means that if the ref property exists, we can type usage of `props.ref` (or via destructuring) the same as the result of `useRef()` and infer downstream usage similarly.

ghstack-source-id: 76cd07c5dfeea2a4aafe141912663b097308fd73
Pull Request resolved: #29834
@josephsavona josephsavona deleted the gh/josephsavona/28/head branch June 10, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants