Vue vs React vs Angular vs jQuery Part.3アーカイブ最終更新 2019/06/12 18:521.デフォルトの名無しさん/w2uRKiX1. jQueryはシンプルに書けるVue・Reactは冗長証拠 https://jsfiddle.net/t62b49mp/JavaScriptのコードはこれだけ$('.my-component [name="switch"]').change(function() { $(this).closest('.my-component').toggleClass('active', this.checked);});2. 信者「Vueならこれだけで動く!」嘘1 isActive=false嘘2 new vue({data:{isActive:false}})https://codepen.io/anon/pen/MxmrjP (動かない)嘘3new Vue({el: '#app',data: {isActive:false},})https://codepen.io/anon/pen/XGgpZV (変な動きをする)3. 結論jQueryはシンプルに書けるVue・Reactは冗長出典 https://mevius.5ch.net/test/read.cgi/tech/15603331772019/06/12 18:52:571すべて|最新の50件
【“客の勘違い”を生んでしまうコンカフェ業界の闇】39歳の客が24歳キャストを殺害・・・容疑者 「好きだったから彼女や店には、これまで800万円はつぎ込んだ。なのに、冷たくあしらわれた」ニュース速報+3321245.62026/11/29 15:27:24
【社会】「突然大きないびきが…」ジムの女性大浴場で心肺停止AED手に女性専用エリア前で躊躇する男性店長…居合わせた看護師が繋いだ命のリレーニュース速報+132997.52026/11/29 15:27:19
証拠 https://jsfiddle.net/t62b49mp/
JavaScriptのコードはこれだけ
$('.my-component [name="switch"]').change(function() {
$(this).closest('.my-component').toggleClass('active', this.checked);
});
2. 信者「Vueならこれだけで動く!」
嘘1 isActive=false
嘘2 new vue({data:{isActive:false}})
https://codepen.io/anon/pen/MxmrjP (動かない)
嘘3
new Vue({
el: '#app',
data: {isActive:false},
})
https://codepen.io/anon/pen/XGgpZV (変な動きをする)
3. 結論
jQueryはシンプルに書けるVue・Reactは冗長