Closed christianJessMark closed 2 years ago
Using the new createRoot syntax I cannot see the Counter component (or anything else I try to render).
createRoot
My code:
act(() => { const div = document.createElement('div') document.body.append(div) createRoot(div).render(<Counter />) })
Output of console.log(document.body.innerHtml) is <div><div>
console.log(document.body.innerHtml)
<div><div>
Doh. Looked at the final version, only the render needs to be wrapped in act.
render
act
Using the new
createRoot
syntax I cannot see the Counter component (or anything else I try to render).My code:
Output of
console.log(document.body.innerHtml)
is<div><div>