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: nextjs-example page.tsx code refactored for better readability #94

Merged
merged 4 commits into from
Dec 8, 2023

Conversation

abrahamvphilip
Copy link
Contributor

@abrahamvphilip abrahamvphilip commented Dec 7, 2023

Refactored the Card Component Rendering in page.tsx

Issue: The Card component was instantiated multiple times to render multiple content.

Solution: Implemented a more favorable approach by creating a 'cards' array of objects and utilizing the map function to render each Card component. This not only reduces code redundancy but also improves the maintainability and readability.


I tried earlier but had some issues and fixed that, but now there's one issue that persists and am not sure if this will work. Am sorry, didn't mean to do it twice. I've mentioned the issue in #93

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 7, 2023
Copy link
Contributor

@necolas necolas left a comment

Choose a reason for hiding this comment

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

I don't think the indirection is an improvement. Nothing wrong with the existing code. I'll leave this open for a bit in case you want to submit just the typo fixes though

@abrahamvphilip
Copy link
Contributor Author

I don't think the indirection is an improvement. Nothing wrong with the existing code. I'll leave this open for a bit in case you want to submit just the typo fixes though

Uhh okay, no probs. i fixed the typo on my new code. do you want me to revert it back to original or this works?

@necolas
Copy link
Contributor

necolas commented Dec 7, 2023

Yes revert the changes please

Copy link
Contributor

@nmn nmn left a comment

Choose a reason for hiding this comment

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

Thanks for the grammar fixes.

@nmn nmn requested a review from necolas December 8, 2023 13:17
@nmn nmn merged commit c9b2057 into facebook:main Dec 8, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants