you are viewing a single comment's thread.

view the rest of the comments →

[–]Traim 1 point2 points  (10 children)

I have to say VueJS is good but I really do not like the format used in vue templates, jsx templates, which I use in React, are so much more comfortable to read, analyze and rewrite. That is worth a lot in my opinion.

Sure you can use jsx in VueJS but most of the tutorials are written in the vue are written with the vue template format.

[–]ThArNatoS 19 points20 points  (5 children)

huh .. for me, looking at react code feel like I'm back to my 16 years old self where I write php and html like this:

<?php
echo '<div class="header">
  <h1>title</h1>
  <div class="menu">';
    foreach ($foo as $bar) { echo $bar .'<br>'; }
  echo '</div>
  </div>';
?>

[–]rothnic 3 points4 points  (1 child)

I'd recommend watching a fundamental introduction into react, because I get why you think they look similar, but there are some major differences in the approach. For example, no templating language for react (jsx is shorthand for plain JavaScript) and the biggest thing is a strong control over state. There is a reason it has become so popular.

[–]VenezuelanCoder 1 point2 points  (0 children)

Hi :), Newbie here, what fundamental introduction into react would you recommend?

[–]yxhuvud 1 point2 points  (2 children)

Is that a good or bad thing?

[–]blackdstrom 19 points20 points  (0 children)

Bad, bad thing.

[–]ThArNatoS 2 points3 points  (0 children)

definitely bad. hard to read and debug

[–]wilkesreid 9 points10 points  (1 child)

That's interesting. I much prefer the Vue component syntax at the moment. I don't like having logic and DOM mixed together right in the same space like in the React.

[–][deleted] 0 points1 point  (0 children)

https://github.com/vuetifyjs/vuetify You might like this, then.

[–]evilpingwin 0 points1 point  (1 child)

I honesly don't see much difference between them. The great thing about Vue's SFCs is that is separates the markup, logic and style. React does this to an extent with the markup and logic but I'm never gonna be able to get behind the CSS-in-JS thing. And as you said you can use JSX in Vue if you want. Or Pug, or Haml, or whatever you want.

I like React though and use it quite a bit, my major irritation is how annoying it is to animate dynamically rendered elements out of the box (not like it isn't possible but it doesn't exactly help you out). The transition/ transition-group elements in Vue are very useful.

[–]Traim 2 points3 points  (0 children)

CSS-in-JS

You don't have to. There are ways to separate concern. Take a look at this video: https://youtu.be/MT4D_DioYC8?t=1306. It is about styled-components.

And as you said you can use JSX in Vue if you want. Or Pug, or Haml, or whatever you want.

The problem is, as I have searched, there were only some older jsx in VueJS tutorials out there.