Hmm, I tried playing around with Moon a bit, and it didn’t seem to work so well. At least for someone coming from Vue expecting similar features.
Vue:
methods: {
increment() {
this.count++
}
}
Or you can simpy use an inline expression
<button @click="count++">Increment</button>
Moon:
methods: {
increment() {
this.set('count', this.get('count') + 1);
}
}
Moon doesn’t support inline expressions for events
Some other things that work in Vue but not in Moon:
{{value || 'default'}}
In Moon, this will display ‘undefined’ as text if value doesn’t exist.
{{toggle ? 'On' : 'Off'}}
This will display “On” even when toggle is false
I then tried:
{{toggle == 'true' ? 'On' : 'Off'}} and {{toggle == true ? 'On' : 'Off'}}
They would always display “Off” even when toggle was true 