-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
Rename lifecycle methods #7751
Comments
Similar discussions has been had before. In my words, it's about being very explicit about the purpose and also that they are life-cycle methods (and thus special), not just regular methods.
Is that supposed to be a bad thing? Clarity always trumps being concise. The actual behavioral differences of GET and POST cannot be understood by just looking at the words without having experience with HTTP, whereas the hypothetical longer names actually could be understood by most people.
That's exactly what they do IMHO,
That seems like hyperbole. How is If you can give meaningful reasons/argue for what you think is wrong with the current names or come up with names that are objectively more descriptive/helpful then that would be helpful., But it's not obvious to me what's wrong with what we have other than you not liking it. |
It's okay to me, but the only bad part is the word |
It is intentionally long so that you use them sparingly, and so that it is easy to search for in giant codebases, safely replace automatically, etc. |
REST? You mean HTTP? |
I'll close this because it's an intentional design decision. The lifecycles themselves will likely change to something more declarative after Fiber (#6170) is shipped. However whether something has a Thank you for your concerns! |
Feature request: Can you consider renaming the byzantine lifecycle method names? I mean, come on, componentDidUpdate(), componentWillReceiveProps(), shouldComponentUpdate() ? React is declarative, huh? How about concise method names that "are easy to reason about" as React claims to be? How about rendered() ? Or updated().
Sometimes I think if the React team had invented REST, instead of GET and POST, we'd have clientWillRetrieveData and clientWillTransmitDataWithParameters.
A lifecycle implies the passage of time. How about method names that succinctly indicate where things are within that cycle? How about method names that are useful to developers building applications, not compound, portmanteau words that reflect internal engineering complexity.
The text was updated successfully, but these errors were encountered: