react icon indicating copy to clipboard operation
react copied to clipboard

[ESLint] Allow `useId` in async functions

Open eps1lon opened this issue 1 year ago • 2 comments

Summary

Closes https://github.com/facebook/react/issues/31187 useId is the only Hook allowed in React Server Components so it should be allowed in async functions.

How did you test this change?

Added tests for useId in async Components (passing), Hooks (passing) and functions (failing)

eps1lon avatar Oct 13 '24 11:10 eps1lon

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 Oct 15, 2024 1:24pm

vercel[bot] avatar Oct 13 '24 11:10 vercel[bot]

Comparing: c7c68ef842639f8535942b6247ef758221d289fb...e991083fb20a40d95a58cdaffe1b20a1e40fc1a2

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.68 kB 6.68 kB = 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 506.33 kB 506.33 kB = 90.58 kB 90.58 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 511.26 kB 511.26 kB = 91.30 kB 91.30 kB
facebook-www/ReactDOM-prod.classic.js = 603.42 kB 603.42 kB = 106.73 kB 106.73 kB
facebook-www/ReactDOM-prod.modern.js = 579.61 kB 579.61 kB = 102.82 kB 102.82 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by :no_entry_sign: dangerJS against 6a590b63d8fb062276c7d59dba766e705279d08a

react-sizebot avatar Oct 13 '24 11:10 react-sizebot

Would be good to add these things to the docs too when we land them https://github.com/reactjs/react.dev/pull/7715

rickhanlonii avatar Apr 03 '25 20:04 rickhanlonii