B
B
bpGusar2019-12-11 15:40:52
Vue.js
bpGusar, 2019-12-11 15:40:52

What is better to use in VueJS - native syntax or JSX?

Which is better to use in VueJS - native syntax or JSX?
As someone who only used React, it’s more convenient for me, of course, the JSX syntax, but is it normal to use it permanently in VUE?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Talalaev, 2019-12-11
@bpGusar

If the project is for yourself, or quick prototypes, theory testing, etc., then do it as you are used to and conveniently.
If the project is relatively large, several people work, then there should be some kind of coding standard. And here you need to think about whether it will be convenient for everyone, and what will happen with the expansion, and what are the pitfalls. In general, with the complication of logic and a bunch of custom components, JSX is almost always at least easier to read.
Personally, when something simple and transparent, which does not go beyond the use of standard Vue templates, I don’t remember about JSX. But if you need to be smart, then it's just more convenient to read the code, this is at least.
But I repeat:
And so, Vue is friendly with JSX, it is supported.

V
Vasily Nazarov, 2019-12-12
@vnaz

I would proceed from the fact that JSX is not a standard in Vue, and a frame is, among other things (or even mostly) a unity of approaches for different developers.
And a personal opinion: JSX is generally some kind of obscenity, why pull it into a project on a beautiful harmonious Vue?

B
beduin01, 2019-12-11
@beduin01

In any project, focus primarily on further support. You 95% of the time will not have to write code, but read it. JSX will only make it harder for you to understand and read the code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question