jan icon indicating copy to clipboard operation
jan copied to clipboard

refactor: children with same key

Open freelerobot opened this issue 1 year ago • 1 comments

prob a react issue?

in app-index.js:33

app-index.js:33 Warning: Encountered two children with the same key, `01HKEEJCE9QB5M0WS39EYQS99S`. 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.
    at div
    at div
    at Panel (webpack-internal:///(app-pages-browser)/../node_modules/react-scroll-to-bottom/lib/esm/ScrollToBottom/Panel.js:22:23)
    at div
    at BasicScrollToBottomCore (webpack-internal:///(app-pages-browser)/../node_modules/react-scroll-to-bottom/lib/esm/BasicScrollToBottom.js:24:23)
    at Composer (webpack-internal:///(app-pages-browser)/../node_modules/react-scroll-to-bottom/lib/esm/ScrollToBottom/Composer.js:132:29)
    at BasicScrollToBottom (webpack-internal:///(app-pages-browser)/../node_modules/react-scroll-to-bottom/lib/esm/BasicScrollToBottom.js:52:29)
    at ChatBody (webpack-internal:///(app-pages-browser)/./screens/Chat/ChatBody/index.tsx:40:74)
    at div
    at div
    at div
    at div
    at ChatScreen (webpack-internal:///(app-pages-browser)/./screens/Chat/index.tsx:54:78)
    at div
    at MotionComponent (webpack-internal:///(app-pages-browser)/../node_modules/framer-motion/dist/es/motion/index.mjs:49:65)
    at div

freelerobot avatar Jan 06 '24 03:01 freelerobot

01HKEEJCE9QB5M0WS39EYQS99S is the id of a message in messages.jsonl. Using it as the key of a React component is correct. We need to check why we have a list of duplicated message id in our state.

namchuai avatar Jan 07 '24 04:01 namchuai

@0xSage @namchuai i'll close this issue since we not encounter this issue again, feel free to reopen if the issue still persist

urmauur avatar Jan 30 '24 10:01 urmauur