mountApp function

void mountApp(
  1. Component root, {
  2. String selector = '#app',
})

Implementation

void mountApp(Component root, {String selector = '#app'}) {
  final container = document.querySelector(selector);

  if (container == null) {
    throw Exception('Mount point not found: $selector');
  }

  final renderer = WebRenderer(container);
  final runtime = ComponentRuntime(renderer);

  runtime.mount(root);
}