Existence of componentDidMount
throws "Error while invoking findComponentRoot
"
#308
Labels
componentDidMount
throws "Error while invoking findComponentRoot
"
#308
Scenario
I am trying to use React to dynamically replace a
tbody
tag with my app's content. In addition, I need to use acomponentDidMount
callback to handle some custom event binding.Problem
As soon as the
componentDidMount
callback is added toReact.createClass
, React throws the following errors:JSFiddle here
Conclusion
The content still renders, but the error is a bit unnerving. Simply removing the callback prevents the errors from being thrown.
I'm brand new to this, so its possible that I'm trying to make React do something that it is not meant to handle. But either way, I think the mere existence of an empty callback should not be throwing any errors.
FWIW, other scenarios that involve injecting content rather than replacing an existing DOMNode seem to work fine with or without the
componentDidMount
callback.The text was updated successfully, but these errors were encountered: