How to use the fela-tools.renderToElement function in fela-tools

To help you get started, we’ve selected a few fela-tools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github robinweser / fela / packages / fela-dom / src / render.js View on Github external
export default function render(
  renderer: DOMRenderer,
  mountNode: DOMNode
): void {
  // legacy support for single stylesheets
  // will be removed soon
  if (mountNode) {
    if (!warnDeprecated) {
      // TODO: warn
      warnDeprecated = true
    }

    renderToElement(renderer, mountNode)
  } else {
    initStyleNodes(renderer)
    const updateInterface = createDOMInterface(renderer)
    renderer.subscribe(updateInterface)
  }
}