roginfarrer / eslint-plugin-react-server-components

ESLint rule for enforcing "use client" in React client components
MIT License
30 stars 4 forks source link

Allow useId in server and shared components #7

Closed connor-baer closed 9 months ago

connor-baer commented 9 months ago

Context

The useId hook is the only hook that is allowed in client, server and shared components, which means it doesn't require the use client directive. From the React docs:

Third-party components that use any of the following React APIs must run on the client:

Changes

changeset-bot[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: 452d331e99da3258879df2d0e37cf6568ef4c023

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------------------------------- | ----- | | eslint-plugin-react-server-components | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

roginfarrer commented 9 months ago

Nice, thanks!