DEV Community

Discussion on: VanillaJS or Frameworks/Libraries (React)?

Collapse
 
crabyke profile image
Duzmath Lajos • Edited

Hey,
Lol, I just read your post like 15 mins ago:D

This seems a real hard decision, to decide which framework I want to go with.

I feel like I have an intermediate understanding of VanillaJS, but React or other frameworks seem a bit off to me.. strange..
It might be because I have no idea, what to start building with the frameworks.
As I mentioned, these beginner projects, seem really hard..

Collapse
 
peerreynders profile image
peerreynders • Edited

but React or other frameworks seem a bit off to me.. strange..

I've left some extensive comments regarding "React and the Web" with an earlier article which I'm not going to repeat here.

I think PHP creator Rasmus Lerdorf has a salient point (Frameworks - they all suck!):

  • Everyone needs a framework
  • What everyone doesn't need is a general-purpose framework
  • Nobody has a general problem, everybody has a specific problem they're trying to solve
  • While the general purpose framework can solve it, it usually solves it in a less than optimal way (i.e. choose your trade-offs wisely)

From that perspective:

  • Angular JS was developed for Google's internal "Green Tea" CRM application. It primarily targeted the desktop web over the corporate backbone. So the fact that is was relatively heavy-weight didn't matter and the prevailing enterprisy mindset ("it fetishizes complexity exactly the way that Java developers are used to") favoured "batteries included application frameworks".

  • React on the other hand constrained itself to be a "view framework" for public facing sites of the desktop web that had an API that could be learned in a weekend (though that didn't constrain the growth of the supporting ecosystem that developers would have to contend with). What people don't seem to account for is that Facebook has the resources to develop and maintain native clients for any device they wish to support on the planet. So their web solution just has to be just "good enough" to get people hooked to download the native app.

  • Evan You had worked with Angular JS and concluded that most applications would never benefit from the complexity that enterprisy applications are so fond of - so he created Vue. Vue had to take on Angular and React and isn't backed by the resources of a mega-corporation. Compared to Angular and React, Vue's much more of an open source community effort; so it is actually respectable what it managed to accomplish over the past 6 years.

  • Rich Harris is responsible for Svelte (Rethinking reactivity/The Return of 'Write Less, Do More'). From what I've seen I have to guess that he is used to working pretty close to the browser-metal because Svelte feels like an extension to what the browser is already capable of and tends to work with it rather than against it, smoothing over the rough edges quite nicely - while deliberately not setting out to create an entirely new paradigm.

Back in 2000 "The Pragmatic Programmer" recommended to "Learn at least one new language every year" as a means to escape one language. Similarly I don't believe that "one framework" is enough - unless you are a building the same type of application over and over again.

In my judgement Svelte should be the easiest to learn (though at this point likely the least commercially viable), Vue is workable but React has grown to such proportions that it is hard to escape (well, at least Preact is a partial escape) from - but I think it's a good idea to have other irons in the fire.

Tailwind counter opinions
Musings on Tailwind - part 1
Musings on Tailwind - part 2

Collapse
 
mjablecnik profile image
Martin Jablečník • Edited

If it is hard for you so this can help you: 2020.stateofjs.com/en-US/technolog...
Here you can see that the most popular framework are:
Svelte, React and Vue
And in development companies are using React or Vue.

Then depends only on the approach what you want to have during development:
Building components with JSX or build components classically with Template?

If you are new or you don't have a lot of experiences with development and you know only VanillaJS so I can recommend you to try Svelte.
It is pretty simple and I think that there you can understand the basics about development Web applications (SPA or PWA) and then you can go to learn Vue which is similar but a little more complex and mature.
After this you can somewhere find a job as Vue developer or try learn React for see a different between Vue and React (both frameworks are very good)

And of cource I agree with you, that programming with React can be strange for you if you have only intermediate VanillaJS knowledges.. :)
But there is a little different approach and setup of your mind required for develop some nice web applications then develop only some web pages with VanillaJS.. ;)