You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
False positive on useTranslations() from next-intl #9
When using the line const t = useTranslations(); (from next-intl) in a Next.js React component, it falsely triggers the react-server-components/use-client rule. At a guess I would assume this to be because useTranslations() support both server and client side rendering and as such the inspection may be falsely flagging something inside of it.
In the short term we are going to just individually prefix all of our useTranslations lines with // eslint-disable-next-line react-server-components/use-client lines above them, but this is unwieldy and would prefer to be avoided. It would be good if this false positive can be fixed, or if we could configure some global pattern for lines that can be ignored by this rule.
Activity
roginfarrer commentedon May 26, 2024
Added an option to make exceptions for hooks in 1.2.0
https://github.com/roginfarrer/eslint-plugin-react-server-components/releases/tag/v1.2.0