codestates / codestates/ThereWeather

[๐Ÿ‘พ Error Handling] Warning: Encountered two children with the same key, 35. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted โ€” the behavior is unsupported and could change in a future version.

Open
#186 0 comments 0 reactions 0 assignees View on GitHub
error
Dominant language
JavaScript
Stars
0
Forks
3
PR merge metrics
No merged PRs in 30d

Description

## ์–ด๋–ค ์—๋Ÿฌ์ธ๊ฐ€์š”?
- BookmarkList ๋ฐฐ์—ด์„ map์œผ๋กœ ๋ Œ๋”๋งํ•˜๋ฉด์„œ ๋œจ๋Š” ์—๋Ÿฌ

## ์—๋Ÿฌ ๋ฉ”์‹œ์ง€
```jsx
index.js:1 Warning: Encountered two children with the same key, 35. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted โ€” the behavior is unsupported and could change in a future version.
```

## ์—๋Ÿฌ ํ•ธ๋“ค๋ง ๋ฐฉ๋ฒ•
```jsx
์ปดํฌ๋„ŒํŠธ ์ž์‹์š”์†Œ๋กœ 4๊ฐœ์˜

์˜ key๋“ค์ด ์„œ๋กœ ๊ฐ™์•„ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋“ฏํ•˜์—ฌ
๋“ค์„ ์ง€์šฐ๊ณ  ํ•˜๋‚˜์˜ div์— key๋ฅผ ์„ค์ •ํ•˜๊ณ 
์‚ญ์ œํ–ˆ๋˜ ๊ฐ div๋“ค์˜ ๋‚ด์šฉ์„ ํ•˜๋‚˜์˜ div์•ˆ์—

ํƒœ๊ทธ๋กœ ์ž‘์„ฑํ•˜์˜€์Œ


{}


{}


{}


{}




```

## ์—๋Ÿฌ ํ•ธ๋“ค๋ง์„ ์œ„ํ•ด ์ฐธ๊ณ ํ•œ ๋ ˆํผ๋Ÿฐ์Šค ๋งํฌ
[์˜ˆ์‹œ1](https://awesomezero.com/development/react-key/)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.