• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

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

19.09.04 10:11 작성 조회수 7.29k

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

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