context is optional

This commit is contained in:
Sebastian 2022-12-20 15:27:44 -03:00
parent a160f31514
commit 1500c91f36
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1

View File

@ -80,7 +80,7 @@ const isNode = typeof window === "undefined";
export function renderNodeOrBrowser(
Component: any,
args: any,
Context: any,
Context?: any,
): void {
const vdom = !Context
? create(Component, args)
@ -91,7 +91,6 @@ export function renderNodeOrBrowser(
if (!isNode) {
document.body.appendChild(parentElement);
}
// renderIntoDom works also in nodejs
// if the VirtualDOM is composed only by functional components
// then no called is going to be made to the DOM api.