-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Question and suggest: The official identifier of Server Compnoent and Client Component #28561
Comments
|
Such an approach violates the principle of separation of concerns, as component files should be independent of where they are used (on the server or client). Instead, it's better to strive for creating reusable components that can work seamlessly both on the server and client without modifications. |
Some components only make sense on the server (e.g. accessing the file system) and need server directives. Most components can be used as both and don't need directives. The linked RFCs go into more detail. If there are issues with the current approach, I recommend filing a new issue outlining the problems in detail with some examples. Closing this since the original question was answered. |
As so far , only next.js and react original js support react server componet.
In next.js developer is to being requested to use “use client” to idenfy the react client component , and all of the other js are default to react server component.
In the community find the another way to identity component is to change its file suffix
'.server.js' means this is a server component
'.client.js' means its a client component
So I want to know what is the react official identifier for server component and client component in future?
The text was updated successfully, but these errors were encountered: