Answer the question
In order to leave comments, you need to log in
How to manually insert DOM components in a react tree?
I have a task to manually insert a component into the DOM tree. That is, by analogy with
let container = document.getElementById('container');
let h2 = document.createElement("h2");
h2.innerHTML = "Hello!";
container.appendChild(h2);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question