Skip to main content

Module: render

Functions​

render​

▸ render(fiber, container): void

Renders the given fiber and its children to the DOM in the given container. Note that all children of the container will be removed from the DOM, before the fiber and its children are rendered.

Parameters​

NameTypeDescription
fiberFiberThe fiber which should be rendered.
containerHTMLElementThe container in which the fiber should be rendered.

Returns​

void

Defined in​

render.ts:15


rerenderFunctionalFiber​

▸ rerenderFunctionalFiber(fiber, container): void

Re-renders the given FunctionalFiber inside the given container. This will create a copy of the fiber tree, re-evaluate the fiber's fiberFunction and compare the newly generated fiber tree to the old one, applying all changes to the DOM.

Parameters​

NameTypeDescription
fiberFunctionalFiberThe fiber which should be re-rendered.
containerHTMLElementThe container to render the fiber in.

Returns​

void

Defined in​

render.ts:28