Watchers

The purpose of watchers is to connect the data model to HTML. When changes occur in the data model, callbacks are called and modify the HTML. Watchers can be used as following.

      
elytra.add("model", {
  text: "Hello World!"
});
elytra.model.text.watcher = console.log;
elytra.model.text = "Wow!";