Library Integration

Framework-agnostic Libraries

Use <lifecycle> tag

import Map from "map";
<lifecycle
  onMount() {
  return {
    map: Map()
  };
}
  onUpdate() {
  this.map.doSomething();
}
  onDestroy() {
  this.map.destroy();
}
>
import Map from "map"

<lifecycle
  onMount() {
    return { map: Map() };
  }
  onUpdate() {
    this.map.doSomething();
  }
  onDestroy() {
    this.map.destroy();
  }
>
import Map from "map";
lifecycle
  ,onMount() {
  return {
    map: Map()
  };
}
  ,onUpdate() {
  this.map.doSomething();
}
  ,onDestroy() {
  this.map.destroy();
}
import Map from "map"

lifecycle
  ,onMount() {
    return { map: Map() };
  }
  ,onUpdate() {
    this.map.doSomething();
  }
  ,onDestroy() {
    this.map.destroy();
  }

Marko Libraries

Web Component Libraries

Consuming in Marko

Using Marko in a Web Component

Wrapping Imperative APIs


Contributors

Helpful? You can thank these awesome people! You can also edit this doc if you see any issues or want to improve it.