-
Notifications
You must be signed in to change notification settings - Fork 3
Components
Arthur Guiot edited this page May 12, 2018
·
2 revisions
Components are very tiny class. They are meant to live inside Groups, and render single elements.
Here is a small example:
class Component extends P.Component {
render() {
this.component.innerHTML = "Hello World 🌎!"
}
}
class Group extends P.Group {
init() {
this.component = this.mountComponent(
this.group.querySelector(".component"),
Component
)
}
}