create account

RE: Learning Vue.js - A Task List by harps116

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @matthewdavid/learning-vue-js-a-task-list

· @harps116 · (edited)
$0.26
Great work! Here's another way to eliminate the method but keep the button and click binding:
```
<button @click="task.completed = !task.completed">Toggle</button>
```
Here's the fiddle:

https://jsfiddle.net/harps116/2hmu4yyh/2/

This technique is pretty handy for toggle scenarios. Of course you could abstract the logic into a method for reuse and have a global toggle utility method which might be useful.
👍  ,
properties (23)
authorharps116
permlinkre-matthewdavid-learning-vue-js-a-task-list-20180116t131914378z
categoryjavascript
json_metadata{"tags":["javascript"],"links":["https://jsfiddle.net/harps116/2hmu4yyh/2/"],"app":"steemit/0.1"}
created2018-01-16 13:19:15
last_update2018-01-16 13:22:33
depth1
children1
last_payout2018-01-23 13:19:15
cashout_time1969-12-31 23:59:59
total_payout_value0.202 HBD
curator_payout_value0.058 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length409
author_reputation31,145,258,360
root_title"Learning Vue.js - A Task List"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id29,938,224
net_rshares27,906,559,188
author_curate_reward""
vote details (2)
@matthewdavid ·
Thank you. I think that this "demo app" idea of a Task List or Todo List is a good way to learn. I think I will create one for myself with a database backend as a way to learn how to put everything together.
properties (22)
authormatthewdavid
permlinkre-harps116-re-matthewdavid-learning-vue-js-a-task-list-20180117t213558613z
categoryjavascript
json_metadata{"tags":["javascript"],"app":"steemit/0.1"}
created2018-01-17 21:35:57
last_update2018-01-17 21:35:57
depth2
children0
last_payout2018-01-24 21:35:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length207
author_reputation2,155,255,892,877
root_title"Learning Vue.js - A Task List"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id30,259,715
net_rshares0