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

fix(SinglePokemon.tsx): Added missing keys to .map()'s #2

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

B-cavazos
Copy link
Owner

Changes

  1. ./src/pages/SinglePokemon.tsx

Purpose

console error renders when navigating to single Pokemon page

Approach

Keys are required in React to help identify changes to a list. key ={i} has been added to the parent div within each .map() where there is no key

Learning

Because there is no explicit list item in the file, I referred to React Documentation to confirm .map() requires a Key for each iteration

React Documentation

#4

@B-cavazos B-cavazos changed the title Bc 4 single pokemon console err test(Home.tsx, SinglePokemon.tsx): removed console.logs Apr 20, 2021
@B-cavazos B-cavazos changed the title test(Home.tsx, SinglePokemon.tsx): removed console.logs fix(SinglePokemon.tsx): Added missing keys to .map()'s Apr 20, 2021
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.

1 participant