-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Code Quality: Refactor all React class components to functional components using hooks #22890
Comments
👋 I'm working on TabPanel component. |
I'm working on DatePicker component ;) |
I'm working on Dashicon component :-) |
I'm working on ImageSizeControl component. |
@c4rl0sbr4v0 Actually the Dashicon component is a bit special, it's one that is generated on a separate repository and injected here as is (not edited manually), I'd recommend working on another component if possible. |
Question about refactoring components: should we use In order to have all more or less the same structure :-) |
I use |
@c4rl0sbr4v0 I think both are fine to use. |
We don't have a defined guideline, I think we prefer |
I took Dropdown, this is not an easy one 😆 |
@c4rl0sbr4v0 : It seems named functions are more appreciated than arrow functions 😄 |
It's especially good to refactor the blocks since that code is the most looked at and copied. |
If I work on refactoring the |
@pkvillanueva not necessarily, you can do one by one. |
I'm working on the |
PR for CalendarEdit #23072. |
Tooltip done here #27353 |
I'm working on |
I'm working on the |
I've done |
I'm working on FullscreenMode component. |
@youknowriad I've done |
@gziolo If I exclude native code, tests, documentation, error boundaries... I find 38 instances. It's a bit better :) |
I would like to refactor |
👋 I'm working on |
Linked PR for |
I have a PR open to convert the |
I'm working on the Media Upload Progress component |
The official recommendation for writing React components is as follows.
If you're a new/junior contributor looking to help with this refactoring, follow these steps:
extends Component
Note This is a tracking issue for the React components guidelines. This issue is tailored specifically for junior and new contributors. Experienced contributors shouldn't do big refactorings unless they update the code for another reason (bug fix, feature).
The text was updated successfully, but these errors were encountered: