You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to make React work with Bricklayer reliably. Problem happens when you mount a component which has Bricklayer content in it and update the component w/o unmounting.
However, any update that ItemsList receives makes react upset and it fails even before getting to componentDidUpdate and it's not able to remove any elements from the DOM and it builds up indefinitely like that.
This is what I see in this repro example. However, in my actual application, I am observing the below error on the same issue which is a bit different:
VM26259:1 Uncaught TypeError: error.stack is not a function
at eval (eval at evaluate (unknown source), <anonymous>:1:7)
at eval (webpack:///./src/components/common/formUtils.js?:17:13)(anonymous function) @ VM26259:1(anonymous function) @ formUtils.js:17
error
TypeError: Cannot read property 'getHostNode' of null
at Object.getHostNode (webpack:///./~/react/lib/ReactReconciler.js?:64:28)
at ReactCompositeComponentWrapper.getHostNode (webpack:///./~/react/lib/ReactCompositeComponent.js?:383:28)
at Object.getHostNode (webpack:///./~/react/lib/ReactReconciler.js?:64:29)
at Object.updateChildren (webpack:///./~/react/lib/ReactChildReconciler.js?:130:46)
at ReactDOMComponent._reconcilerUpdateChildren (webpack:///./~/react/lib/ReactMultiChild.js?:210:32)
at ReactDOMComponent._updateChildren (webpack:///./~/react/lib/ReactMultiChild.js?:314:31)
at ReactDOMComponent.updateChildren (webpack:///./~/react/lib/ReactMultiChild.js?:301:12)
at ReactDOMComponent._updateDOMChildren (webpack:///./~/react/lib/ReactDOMComponent.js?:942:12)
at ReactDOMComponent.updateComponent (webpack:///./~/react/lib/ReactDOMComponent.js?:760:10)
at ReactDOMComponent.receiveComponent (webpack:///./~/react/lib/ReactDOMComponent.js?:718:10)
Sample Code
Adding the code used for repro steps here just for reference. However, it has dependencies as you can see. So, it will not work as is. Look at here to make it work with the above repro steps.
My feeling is that Bricklayer somehow removes some things that React put in place (e.g. key of the DOM element like here, etc.) and that makes React send when it tries to remove the nodes during the Reconsilation process.
I am unable to make React work with Bricklayer reliably. Problem happens when you mount a component which has Bricklayer content in it and update the component w/o unmounting.
Repro Steps
Open the app on
http://localhost:3000
and fire up Chrome Dev Tools as well to see the errors. The app initially loads random items and bricklayer nicely shapes them (seecomponentDidMount
). However,HomePage
component updates the content ofItemsList
component without unmounting it in every 3 seconds. That's why I have thedestroy
and reinitialize code insidecomponentDidUpdate
.However, any update that
ItemsList
receives makes react upset and it fails even before getting tocomponentDidUpdate
and it's not able to remove any elements from the DOM and it builds up indefinitely like that.The first error is the below one:
After that, subsequent errors are the same as below one for each update that happens every 3 seconds:
This is what I see in this repro example. However, in my actual application, I am observing the below error on the same issue which is a bit different:
Sample Code
Adding the code used for repro steps here just for reference. However, it has dependencies as you can see. So, it will not work as is. Look at here to make it work with the above repro steps.
The text was updated successfully, but these errors were encountered: