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