Rendering
To render the component we can use the render()
function.
Optionally, we can pass a DOM element or a Selector to indicate where the component should be rendered, the default is document.body
:
Another alternative is to import the render()
method from the main module, it works similarly, but takes a string
as the first argument and the element to render as the second:
Last updated