DEV Community

Discussion on: Vue or React?

Collapse
 
shadowfaxrodeo profile image
Nathaniel

You can do the same style templating in Vue as in React if you wish. You don't have to use v-if. It's just usually easier to write the html seperately.

I don't have much experience with React but it feels less like I'm making a website than with Vue. With Vue I write the html like I would if I was using vanilla javascript, then I use Vue to add functionailty on top. That just makes more sense to me.

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

Less making a website? I think this is not a con, who knows what the future brings maybe someday you run compile in a React project and it spits out a Web, mobile & desktop version.

Thread Thread
 
shadowfaxrodeo profile image
Nathaniel

You're right, not necessarily a con. Just a con for me.

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

I don't even know what you mean by it does not feel like you are making a website, what defines that writing just html css & js in seperate files? Why should everything be like that? I don't get it.

Thread Thread
 
shadowfaxrodeo profile image
Nathaniel

Progressive Enhancement is the reason.

At it's heart a website is an html document, and for functionality that can't be done with html, you use javascript. Then you make it usable and pretty with css.

That's still the best methodology for building a broadly accessible website, with the best performance.

When i build websites I want them to work even if javascript doesn't.

If i was building a video game in the browser then I wouldn't think about it like that. But most of the time websites are still just text and images. You can still achieve these things with react, i just don't think it's designed with that in mind.

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic • Edited

JavaScript is a must have for modern sites if all you think about is how to make website work even if the user has js turned of what very likely no one has these days all you loose is flexibility. Also focusing to much on the browser is wrong I see the power of web tech everywhere also outside of browsers as GUIs for desktop and mobile apps, and if we keep developing like 20 years ago there will be no new innovations. I also see WebAssembly helping the web tech become a standard GUI for every language and platform.

Thread Thread
 
shadowfaxrodeo profile image
Nathaniel

Sure, but right now, if I want to make a website that's as accessible as possible, I don't want to start with Javascript, I want to start with html. So if I need complex functionality i reach for vue. if I need a small amount of functionality i use vanilla javascript.

~0.2% of people have javascript disabled. Javascript doesn't work at all until the page is loaded. So for at least a second every page has javascript disabled. Web crawlers often don't parse javascript.

I may well end up building some complex app with react one day. But I've not come accross a need for it.