Closed Bug 1325914 Opened 8 years ago Closed 8 years ago

fix react-dev warnings

Categories

(DevTools :: Netmonitor, defect, P1)

defect

Tracking

(firefox53 fixed)

RESOLVED FIXED
Firefox 53
Iteration:
53.4 - Jan 9
Tracking Status
firefox53 --- fixed

People

(Reporter: gasolin, Assigned: gasolin)

References

(Blocks 1 open bug)

Details

(Whiteboard: [netmonitor])

Attachments

(1 file)

When you set `ac_add_options --enable-debug-js-modules` in mozconfig, the js debugger will pop some warnings from react-dev: Warning: Unknown DOM property readonly. Did you mean readOnly? in input (created by TreeCell) in div (created by TreeCell) in span (created by TreeCell) in td (created by TreeCell) in TreeCell (created by TreeRow) in tr (created by TreeRow) in TreeRow (created by TreeView) in tbody (created by TreeView) in table (created by TreeView) in TreeView (created by SecurityPanel) in div (created by SecurityPanel) in SecurityPanel (created by Connect(SecurityPanel)) in Connect(SecurityPanel) in Provider Warning: Failed prop type: Required prop `state` was not specified in `FilterButtons`. in FilterButtons (created by Connect(FilterButtons)) in Connect(FilterButtons) (created by Toolbar) in span (created by Toolbar) in span (created by Toolbar) in Toolbar in Provider Warning: Failed prop type: FilterButtons: prop type `triggerFilterType` is invalid; it must be a function, usually from React.PropTypes. in FilterButtons (created by Connect(FilterButtons)) in Connect(FilterButtons) (created by Toolbar) in span (created by Toolbar) in span (created by Toolbar) in Toolbar in Provider Warning: Failed prop type: Required prop `securityInfo` was not specified in `SecurityPanel`. in SecurityPanel (created by Connect(SecurityPanel)) in Connect(SecurityPanel) in Provider Warning: Failed prop type: Required prop `url` was not specified in `SecurityPanel`. in SecurityPanel (created by Connect(SecurityPanel)) in Connect(SecurityPanel) in Provider "Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `FilterButtons`. See https://fb.me/react-warning-keys for more information. in button (created by FilterButtons) in FilterButtons (created by Connect(FilterButtons)) in Connect(FilterButtons) (created by Toolbar) in span (created by Toolbar) in span (created by Toolbar) in Toolbar in Provider" The `readOnly` miss spell should be fixed. There are several `Stateless function components cannot be given refs` warnings as well, ex: Warning: Stateless function components cannot be given refs (See ref "wrappedInstance" in ToggleButton created by Connect(ToggleButton)). Attempts to access this ref will fail. StateOverflow said it could be fixed by upgrading to react-redux 4, which wont attach ref to the wrapped component by default http://stackoverflow.com/questions/35952607/what-does-stateless-function-components-cannot-be-given-refs-mean
Iteration: --- → 53.4 - Jan 9
Flags: qe-verify?
Priority: -- → P1
The PR fixed warnings except the ref related warnings, which need update react-redux. To mitigate any side effects I recommend update redux and react-redux in a separate bug.
Flags: qe-verify? → qe-verify-
Attachment #8821973 - Flags: review?(rchien) → review+
Note that this bug doesn't clean up all react warnings in one sweep. Fred, please file another bug for sweeping all warnings, and put it in Reserve - Backlog. It might be worth to fix these warnings after moving netmonitor to github.
Blocks: 1326137
tracked in Bug 1326137 , thanks
Keywords: checkin-needed
Autoland couldn't rebase this for landing.
Keywords: checkin-needed
Thanks for notice, rebased on latest branch.
Keywords: checkin-needed
Keywords: checkin-needed
Keywords: checkin-needed
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: