Closed Bug 1361541 Opened 8 years ago Closed 7 years ago

Fix unique "key" prop warning (visible when running new console frontend in launchpad)

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox56 fixed)

RESOLVED FIXED
Firefox 56
Iteration:
56.1 - Jun 26
Tracking Status
firefox56 --- fixed

People

(Reporter: bgrins, Assigned: nchevobbe)

References

Details

(Whiteboard: [console-html])

Attachments

(1 file)

STR:
Open console frontend in launchpad
On target tab, run `console.log("hi")`

I see this warning in the launchpad tab:

Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `Message`. It was passed a child from MessageContainer. See https://fb.me/react-warning-keys for more information.
    in span (created by MessageContainer)
    in Message (created by MessageContainer)
    in MessageContainer (created by ConsoleOutput)
    in div (created by ConsoleOutput)
    in ConsoleOutput (created by Connect(ConsoleOutput))
    in Connect(ConsoleOutput)
    in div
    in Provider
Flags: qe-verify-
Priority: -- → P2
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Iteration: --- → 55.5 - May 15
Priority: P2 → P1
Depends on: 1362037
This is due to the "Function" change. Since we don't use components for GripMessageBody, the key need to be put in Reps.
I created https://github.com/devtools-html/reps/issues/146 to do the Rep work, and Bug 1362037 to land a new bundle
Iteration: 55.5 - May 15 → 55.6 - May 29
Iteration: 55.6 - May 29 → 55.7 - Jun 12
Iteration: 55.7 - Jun 12 → 56.1 - Jun 26
Note that to see the error (and the fix with the patch in Comment 2), you need to run the app with `npm run dev` or `yarn run dev` to have React in dev mode, and thus the warning messages.
Comment on attachment 8878471 [details]
Bug 1361541 - Fix warning messages in dev mode.

https://reviewboard.mozilla.org/r/149824/#review155116

Fixes the problem for me, thanks!

Honza
Attachment #8878471 - Flags: review?(odvarko) → review+
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/17948ebf67e5
Fix warning messages in dev mode. r=Honza
https://hg.mozilla.org/mozilla-central/rev/17948ebf67e5
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: