Last active
April 19, 2019 20:02
-
-
Save mardix/eb3d611c3306f32bc45f51fedfa6b7ac to your computer and use it in GitHub Desktop.
relift-example-counter.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<div class="column center" id="counterWidget"> | |
<div><h4>${this.count}</h4></div> | |
<div> | |
<button @click="down" class="button-outline">DOWN</button> | |
<button @click="up" class="button-outline">UP</button> | |
</div> | |
</div> | |
</div> | |
<script type="module"> | |
import reLift from '../src/index.js'; | |
reLift({ | |
el: '#counterWidget', | |
data: { | |
count: 0, | |
}, | |
up() { | |
this.data.count++; | |
}, | |
down() { | |
this.data.count--; | |
}, | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment