-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Capitalize Server Action #6417
Capitalize Server Action #6417
Conversation
Summary of changes: "Server Action", like "Effect", is a React-specific notion that would be benefited from captailization to be distinguished from its genertic meaning. It seems like [Next doc](https://nextjs.org/docs/app/api-reference/functions/server-actions) has also adopted such connventions and we should probably do the same.
Size changes📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. should also do this for Client and Server when they’re used in the React sense (eg “Client component”.
@gaearon do you have a list of things that should be treated like this? It seems like "prop", "state", "ref", "context", etc. are treated in lowercase. I'm asking because, in many languages (at least in Chinese and Japanese writings), English words should be written in their canonical case without considering English rules (e.g. first words, title case). |
Summary of changes: following <#6417>
Summary of changes: following <#6417> Co-authored-by: xuan.huang <[email protected]>
i think it’s just Effect, Hook, and recent new terms where our meaning is overloaded (Client / Server things) |
Summary of changes: See <#6417> Co-authored-by: xuan.huang <[email protected]>
Hmm I can see the argument for Server Action but I actually am not sure I agree for Client and Server. There the meaning is not any different than the English word alone. The distinction can be a little confusing especially with SSR but I am not sure the capitalization does anything to help. |
I feel like it is different in the sense that "Server" can run at the build time while "Client" also runs on the server |
Other words that are capitalized in the docs include:
|
We should probably have a linter for whatever we decide. If people never capitalize it in their tweets does that mean we shouldn't capitalize it in the docs? |
@sophiebits that would be nice but it's pretty challenging to be complete. We can probably capture syntactic ones like |
Summary of changes: See <#6417>. There is one exception though. The error message “Rendered fewer hooks than expected” from React is indeed "hooks" so I kept as-is. Shall we change the error message from React?
I've just manually updated those but yea I agreed with @sophiebits that we need...something at least. This is not going to scale at all |
Summary of changes: See <#6417>. There is one exception though. The error message “Rendered fewer hooks than expected” from React is indeed "hooks" so I kept as-is. Shall we change the error message from React? Co-authored-by: xuan.huang <[email protected]>
Summary of changes: See <#6417> Co-authored-by: xuan.huang <[email protected]>
Summary of changes: See <#6417> Co-authored-by: xuan.huang <[email protected]>
Summary of changes: following <reactjs/react.dev#6417> Co-authored-by: xuan.huang <[email protected]>
Summary of changes: See <reactjs/react.dev#6417> Co-authored-by: xuan.huang <[email protected]>
Summary of changes: See <reactjs/react.dev#6417>. There is one exception though. The error message “Rendered fewer hooks than expected” from React is indeed "hooks" so I kept as-is. Shall we change the error message from React? Co-authored-by: xuan.huang <[email protected]>
"Server Action", like "Effect", is a React-specific notion
that would be benefited from captailization to be distinguished
from its genertic meaning.
It seems like Next doc
has also adopted such connventions and we should probably do the same.