-
Notifications
You must be signed in to change notification settings - Fork 1.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
Update root component to React functional component. #6031
Comments
Can you do it? |
assign it to me |
Shouldn't we follow the same component structure throughout the entire app, instead of having some as functional components and others as class components? |
Yes, it's best to stick to one approach for consistency. Functional components are simpler, perform better, and work well with hooks, making them the preferred choice. While we can migrate gradually, moving all components to functional ones will make the app easier to maintain and align with current React best practices. |
Description:
The root component is currently implemented as a React class component. It should be updated to use a more modern functional component for consistency and to leverage hooks.
currently it looks like this
Additional context:
In the future, all components using class components should migrate to functional components to align with modern React practices.
The text was updated successfully, but these errors were encountered: