Skip to content
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

Convert React component to functional component - generated by AIPR #1057 #1058

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 7, 2024

Change the file './frontend/src/components/profile/skill.js' to a functional react component.

This PR is generated by AIPR, it closes #1057

Copy link

@Asin-Junior-Honore Asin-Junior-Honore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexanmtz
Yes, the component has been fully converted to a functional component. Here are the changes made:

  1. The Skill component is now defined as a function instead of a class component.
  2. The render() method has been removed.
  3. The props parameter is passed to the function, and the classes and title props are destructured from it.
  4. The return statement now directly returns the JSX markup.
  5. References to this.props have been replaced with props.
  6. PropTypes is updated to propTypes.

Overall, the component now follows the functional component syntax and no longer relies on class component syntax. Therefore, it has been fully converted to a functional component.

@alexanmtz
Copy link
Member

@Asin-Junior-Honore Thanks for your review, Asin. Have you checked the page running locally?

@alexanmtz alexanmtz closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert React component to functional component
2 participants