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 some components to functional components #3973

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jcoyne
Copy link
Collaborator

@jcoyne jcoyne commented Oct 31, 2024

Functional components are what all the documentation and tutorials on React show by default. Keeping close to the default style reduces cognitive load on contributors.

Copy link
Member

@marlo-longley marlo-longley left a comment

Choose a reason for hiding this comment

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

Thanks Justin. The conversion seems good, but is there a reason we want to also move from named to default exports? I am thinking that may cause complications for people to need to change their imports syntax.

@jcoyne
Copy link
Collaborator Author

jcoyne commented Nov 1, 2024

Oh, I hadn't considered that. I was just looking at the style used in the react docs (https://react.dev/learn) and copying from there.

@marlo-longley
Copy link
Member

My instinct is it might be best to keep existing export style (named vs default) while converting to functional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants