4 ms·
You can't write JSX without a template compiler (how ergonomic is it to hand write a render function?). It's painful to write React components with just a scrip
by yunyu 9y ago
You can't write JSX without a template compiler (how ergonomic is it to hand write a render function?). It's painful to write React components with just a script embed (this might not be important to you, but it's important for newbies coming from jQuery), while Vue lets you get away with HTML attributes and Vue.extend(). Lastly, Vue's style scoping is superior to anything React has to offer.
- k__ 9y agoHu? You can write JSX with just script embed.
- yunyu 9y ago..How? You'd just get a syntax error. Embedding a runtime babel compiler isn't mentioned in the docs at all (though I guess it would work albeit killing load performance, but it's not something that you would expect newbies to know, especially if it's not in the docs).
- ng12 9y agoWhat kind of webapp are you writing where adding a compilation step adds too much complexity? I get if you're writing an application that's 95% static with a few moving pieces, but otherwise that argument doesn't hold much weight for me.