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

Added Lists and Keys in React.md #459

Closed
wants to merge 1 commit into from
Closed

Added Lists and Keys in React.md #459

wants to merge 1 commit into from

Conversation

kanishbodhwani
Copy link

@kanishbodhwani kanishbodhwani commented Oct 19, 2022

Issue #434

Added Lists and keys in react cheat sheet

Screenshot 2022-10-19 at 7 57 18 PM

@kanishbodhwani
Copy link
Author

@onecompiler-ops Please review this!

# Lists and Keys

This is the example of how we can use lists and keys in react.
We loop through the numbers array using the JavaScript map() function. We return a `<li>` element for each item. Finally, we assign the resulting array of elements to listItems
Copy link
Member

Choose a reason for hiding this comment

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

The list may not be iterating always on a numbers array. Ideally, it should be written as an Array of Objects.

And

  • is not a mandatory it can be
    as well. Can you please add more generic way

  • @kanishbodhwani kanishbodhwani closed this by deleting the head repository Nov 28, 2023
    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