Closed
Bug 1811485
Opened 1 year ago
Closed 1 year ago
CustomFormatter throws because of "Invalid hook call"
Categories
(DevTools :: Shared Components, defect, P3)
DevTools
Shared Components
Tracking
(firefox111 fixed)
RESOLVED
FIXED
111 Branch
Tracking | Status | |
---|---|---|
firefox111 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
Details
Attachments
(1 file)
When expanding some custom formatted CLJS objects, I was seeing some "Invalid object" rendered in some ObjectInspector properties, as well as errors in the console about invalid hook.
It turns out it's not possible to use hook in nested components, and since we may have a component tree like
<CustomFormatter>
<ObjectInspector>
<ObjectInspectorItem>
<!-- nested CustomFormatter -->
<CustomFormatter>
</CustomFormatter>
</ObjectInspectorItem>
<ObjectInspector>
</CustomFormatter>
we can't use hooks
Luckily, it seems easy enough to switch from a function to a component class so we can have proper state.
Assignee | ||
Comment 1•1 year ago
|
||
Depends on D164220
Updated•1 year ago
|
Assignee: nobody → nchevobbe
Updated•1 year ago
|
Severity: -- → S3
Updated•1 year ago
|
Attachment #9313260 -
Attachment description: Bug 1811485 - [devtools] Make `CustomFormatter` a class component. r=sebo. → Bug 1811485 - [devtools] Make `CustomFormatter` a class component. r=bomsy.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/497142089d69 [devtools] Make `CustomFormatter` a class component. r=bomsy.
Comment 3•1 year ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
status-firefox111:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•