Answer the question
In order to leave comments, you need to log in
Is it possible for React.renderComponent to replace the passed node instead of nesting inside it?
when I do this: React.renderComponent( ReactClass, node);
A new DOM object is inserted into the passed node, and it overwrites everything that was inside.
I want nothing to be overwritten inside the node, but added to the existing one.
Or better yet, the node itself was replaced with a new DOM object.
Tell me, is there any way to control this in React?
As far as I understand. There is no such possibility, and this makes me very sad.
Answer the question
In order to leave comments, you need to log in
Add the desired element via document.createElement \ node.appendChild and send the created element to renderComponent .
You may ask why are you doing this?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question