-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Rule to forbid component dot notation? #3860
Comments
This is a confusing requirement and seems very unidiomatic for JS. Is it coming from next.js or from actual React RSC? If the latter, can you find a react issue where it's discussed? |
From what I see it's coming from React itself. I'll dig further and get back to you |
Then I think it's incumbent on the React team to provide a canonical way to statically determine if a component is server or client. This can be a library (best), or an algorithm or heuristics to use (but in this case, they'd basically never be able to change them). |
To be fair I would be okay with a rule that forbids them all the time. I wouldn't want to mess with refactors in case a component has to be moved from server to client. |
Hi, with server components the component dot notation (
Group.Foo
) is not supported, it would be useful to have an eslint rule that forbids its usage to avoid issues like the one described here:vercel/next.js#51593 (comment)
The React error is:
The text was updated successfully, but these errors were encountered: