Closed Bug 1440585 Opened 4 years ago Closed 4 years ago

Avoid React warnings

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1439673

People

(Reporter: Honza, Assigned: Honza)

Details

Attachments

(1 file)

I am seeing a lot of React warnings in Browser Console coming from various DevTools components


Warning: Expected `onClick` listener to be a function, instead got `false`.

If you used to conditionally omit it with onClick={condition && value}, pass onClick={condition ? value : undefined} instead.
    in span (created by Message)
    in span (created by Message)
    in div (created by Message)
    in Message (created by MessageContainer)
    in MessageContainer (created by ConsoleOutput)
    in div (created by ConsoleOutput)
    in ConsoleOutput
    in VisibilityHandler
    in Unknown (created by Connect(Component))
    in Connect(Component)
    in div
    in Provider

Warning: Failed prop type: Invalid prop `messagesUi` of type `array` supplied to `ConsoleOutput`, expected `object`.
    in ConsoleOutput
    in Unknown (created by Connect(Component))
    in Connect(Component)
    in div
    in Provider


Warning: Failed prop type: Invalid prop `selectedRequestVisible` of type `boolean` supplied to `MonitorPanel`, expected `function`.
    in MonitorPanel
    in Unknown (created by Connect(Component))
    in Connect(Component) (created by App)
    in div (created by App)
    in App
    in VisibilityHandler
    in Unknown (created by Connect(Component))
    in Connect(Component)
    in Provider


Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ToolboxTabs`. See https://fb.me/react-warning-keys for more information. in ToolboxTab (created by ToolboxTabs) in ToolboxTabs (created by ToolboxToolbar) in div (created by ToolboxToolbar) in ToolboxToolbar (created by ToolboxController) in ToolboxController

Warning: Failed prop type: Invalid prop `requestFilterTypes` of type `object` supplied to `RequestListContent`, expected `string`.
    in RequestListContent
    in Unknown (created by Connect(Component))
    in Connect(Component) (created by RequestList)
    in div (created by RequestList)
    in RequestList (created by MonitorPanel)
    in div (created by SplitBox)
    in div (created by SplitBox)
    in SplitBox (created by MonitorPanel)
    in div (created by MonitorPanel)
    in MonitorPanel
    in VisibilityHandler
    in Unknown (created by Connect(Component))
    in Connect(Component) (created by App)
    in div (created by App)
    in App
    in VisibilityHandler
    in Unknown (created by Connect(Component))
    in Connect(Component)
    in Provider

Warning: Failed prop type: Invalid prop `requestFilterTypes` of type `object` supplied to `RequestListItem`, expected `string`.
    in RequestListItem (created by RequestListContent)
    in RequestListContent
    in VisibilityHandler
    in Unknown (created by Connect(Component))
    in Connect(Component) (created by RequestList)
    in div (created by RequestList)
    in RequestList (created by MonitorPanel)
    in div (created by SplitBox)
    in div (created by SplitBox)
    in SplitBox (created by MonitorPanel)
    in div (created by MonitorPanel)
    in MonitorPanel
    in VisibilityHandler
    in Unknown (created by Connect(Component))
    in Connect(Component) (created by App)
    in div (created by App)
    in App
    in VisibilityHandler
    in Unknown (created by Connect(Component))
    in Connect(Component)
    in Provider

Honza
STR:

1) Load data:text/html,<script>window.onclick=()=>{var x=new XMLHttpRequest(); x.open("GET", "http://mozilla.org", false); x.send(null);}</script>
2) Open the Browser Console
3) Open the Toolbox
4) Select the Network panel and Console panel
5) Click into the page (to execute XHR)
6) Watch the Browser window - no warning should appear.

Honza
Assignee: nobody → odvarko
Status: NEW → ASSIGNED
Has STR: --- → yes
Priority: -- → P2
Summary: Avoid React warnings related to wrong property types → Avoid React warnings
Component: Bookmarks & History → Developer Tools
Hi Honza... this is a duplicate of bug 1439673 so I will merge your changes with mine.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1439673
(In reply to Mike Ratcliffe [:miker] [:mratcliffe] [:mikeratcliffe] from comment #4)
> Hi Honza... this is a duplicate of bug 1439673 so I will merge your changes
> with mine.

Thanks Mike!

Honza
Comment on attachment 8953360 [details]
Bug 1440585 - Avoid React warnings;

clearing review flag
Attachment #8953360 - Flags: review?(nchevobbe)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.