DEV Community

Discussion on: Making a Vue component: an Editable Navigation Element

Collapse
 
teekatwo profile image
Tori Pugh

Interesting, I didn't know its more tailored to ES5. I just use it because its what I'm used to so my mind goes to it automatically. I need to work on transitioning into ES6.

Collapse
 
pedro profile image
Pedro M. M. • Edited

Yeah. Due to how it works (writing pure javacript objects), it forces you to write code like the following:


var app = {
    data: {},
    methods: {
       addLink: function() {},
       removeLink: function() {}
    }
}

instead of sth like this:


class App {

    addLink() {
    }

    removeLink() {
    }

}

But well. Turns out it's really hard for Vue to fit with ES6 since it uses plain js objects by design, so I understand the Evan's decision and that's why I say that Vue is tailored to ES5.

I guess I just love ES6 because it's closer to other languages and it seems to me that ES6 is kind of cleaner than ES5.