DEV Community

Discussion on: Why are you using React?

Collapse
 
jperals profile image
Joan Perals

Thanks for your detailed answer! So if you have to choose a tool for a project, which one of those (React, Svelte or Vue) would you use? Or it depends? Would it be the same for a side project as for work?

Collapse
 
dasdaniel profile image
Daniel P πŸ‡¨πŸ‡¦

For work I usually reach for Vue. I feel most comfortable getting something into production with Vue, but largely because I use it most often, so that's like a self-fulfilling reasoning.
The reason I prefer it is that it is the fastest to learn, which is helpful when you're working with a team that desn't usually work with js too often. Once you figure out a couple of gotchas (essentially reading the reactivity in depth document) you're ready to contribute. I think the learning curve is quite a bit steeper for react. The react hooks have become quite popular, but I think they make learning react a bit harder. The class based lifecycle hooks were more self explanatory than using useEffect to do three lifecycle evenets. Also getting simple input binding to work requires a lot less boilerplate. I think if I was working with a team that has a strong front-end core competency, I'd advocate for React more.
I think Svelte could use a bit more "maturing" before I start using it as readily as Vue. For example, the svelte extension for VS-code was miss-behaving, so I ended up disabling it and now my IDE marks my code as having errors. I was also had some compatibility issues with two compiled components conflicting on globally declared functions. Also there isn't anything like the Vue or React dev tools (because it works a little different) so debugging issues is not as easy. I think over time these things will improve.