context is optional
This commit is contained in:
parent
a160f31514
commit
1500c91f36
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user