mount function

void mount (
  1. [Component<Map, BaseState> _root,
  2. String id]
)

Implementation

void mount([Component _root, String id]) {
  root = h('div', [_root]);
  root.context.el = app;
  if (app == null) {
    app = querySelector(id);
  }
  if (app == null) {
    throw Exception("not found $id");
  }
  var ctx = resolveBuild(root.node);
  var dom = render(ctx);
  app.children.add(dom);
}