[ESLint] Allow `useId` in async functions
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)
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 |
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
Would be good to add these things to the docs too when we land them https://github.com/reactjs/react.dev/pull/7715