-
Notifications
You must be signed in to change notification settings - Fork 42
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
Refactoring or making the code lean #28
Labels
wontfix
This will not be worked on
Comments
Could you please tell me where this code is. Insert the link instead of a pic |
Here is the permalink
https://github.com/dscvitc/dscvitchennai/blob/759ed45fecbf16c7372a7aefad6a55a2e310a769/components/contributors/List.js
…On Sat, Oct 8, 2022 at 2:21 PM Arjun31415 ***@***.***> wrote:
Could you please tell me where this code is. Insert the link instead of a
pic
Check the official docs
<https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet>
on how to embed a permalink of code in the repo
—
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASWHKPJVXWADQ2YVFSOABILWCEYXRANCNFSM6AAAAAARAFKB2U>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I don't think I get you please could you explain what you are trying to change in codeblocks |
Instead of mapping the CardItem elements there between the <div></div>, i
would map them and store them in a variable. Therefore displaying the
mapped items as <div>{CardItems}</div> instead of what is displayed in the
perma link. This would make the code less cluttered and more Readable .If
you still not get i can show you with the code itself
|
No, we do not need this, it is alright like this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would like to make this code lean by refactoring the card item in a variable called CardItem and then rendering inside the return statement. If you fid this issue useless , please reject.
{list.map((item, index) => (
))}
Changing this to :
const CardItem= list.map((item, index) => (
))
return
(
{CardItem}
)
The text was updated successfully, but these errors were encountered: