AFDG: Declarative Rendering

by Rahul Kadyan

HTML

<script src="https://unpkg.com/vue"></script>

<div id="app">
  Foo: {{ foo }}
  
  Bar: {{ bar }}
  
  <button @click="foo.foo += 1">
  +1 Foo
  </button>
</div>

JavaScript

new Vue({
	el: '#app',
  data: { foo: { foo: 1 }, bar: null },
  watch: {
  	'foo.foo' (value) {
    	this.bar = value
    }
  }
})