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

refactor: remove redundant fragment wrapping a single child #1054 #1144

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

Conversation

KartikSethi21
Copy link

This pull request removes an unnecessary React fragment (<>...</>) that wraps a single child component (), improving the code's clarity and alignment with best practices. Since a fragment is only needed for multiple children, removing it ensures a cleaner and more efficient structure.

Additionally, this change contributes to maintaining a React 18-friendly codebase by reducing unnecessary wrappers.

Changes proposed in this pull request:
Removed redundant fragment around the component.
Ensured compatibility with React 18 by simplifying component structure.
Related Issue(s)
Fixes #1054

Contribution Checklist
Followed contributing guidelines and recommended Git workflow.
Tested changes and verified no impact on existing functionality.
Updated relevant documentation if necessary.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@KartikSethi21 KartikSethi21 changed the title A fragment with only one child is redundant. #1054 refactor: Remove redundant fragment wrapping a single child #1054 Mar 15, 2025
@KartikSethi21 KartikSethi21 changed the title refactor: Remove redundant fragment wrapping a single child #1054 refactor: remove redundant fragment wrapping a single child #1054 Mar 15, 2025
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.

A fragment with only one child is redundant.
1 participant