Reputation: 217
I mean the case when an independent script (like jQuery) changes something on the page rendered by React.
Maybe React has some function validating vDOM == DOM or calculates internally hash of DOM?
Upvotes: 1
Views: 102
Reputation: 5669
Sorry, there is no way to do that.
"React is unaware of changes made to the DOM outside of React. It determines updates based on its own internal representation, and if the same DOM nodes are manipulated by another library, React gets confused and has no way to recover."
You can read the same in react documentation for the support of external libraries for dom manipulation.
Upvotes: 2