Inflearn brand logo image

인프런 커뮤니티 질문&답변

terecal님의 프로필 이미지
terecal

작성한 질문수

React로 NodeBird SNS 만들기

4-13. 게시글 작성 리덕스 사이클

게시글 추가하면 key 에러가 발생해서여

작성

·

7.7K

0

index.js:1 Warning: Encountered two children with the same key, `[object Object]`. 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.
    in div (at pages/index.js:28)
    in Home (at _app.js:28)
    in div (created by Context.Consumer)
    in Col (at AppLayout.js:38)
    in div (created by Context.Consumer)
    in Row (at AppLayout.js:29)
    in div (at AppLayout.js:19)
    in AppLayout (at _app.js:27)
    in Provider (at _app.js:21)
    in NodeBird (created by withRedux(NodeBird))
    in withRedux(NodeBird)
    in Suspense (created by AppContainer)
    in Container (created by AppContainer)
    in AppContainer

 

이거 key를 바꿔야 되는건가여?

https://github.com/hyunsokstar/node_bird_22/blob/master/front/pages/index.js


알려주시면 감사여 ~!

ㄳㄳ~!

 

답변 1

0

제로초(조현영)님의 프로필 이미지
제로초(조현영)
지식공유자

객체 대신 객체 안에 든 고유한 값으로 바꿔주시면 됩니다. 게시글 아이디같은 것으로요.

terecal님의 프로필 이미지
terecal

작성한 질문수

질문하기