DEV Community

Discussion on: Why do you like or dislike React?

Collapse
 
blindfish3 profile image
Ben Calder

I use React professionally; but am happy enough switching between frameworks.

Likes:

  • easy enough to learn
  • component based
  • good employment prospects
  • powerful backing: it's going to be around for a while I guess
  • plenty of support/instructions available
  • flexible
  • available libraries
  • well established

Dislikes:

  • JSX: conditional output can sometimes feel clunky compared to a template-based approach; though Array.map(renderElement) is some consolation
  • state management - usually requires additional libraries like redux (the counterpoint to flexibility is that you have to do extra work yourself and everyone has a different idea of the best approach)
  • boilerplate (especially with redux)
  • payload: you have to ship the framework in your bundle
  • virtual DOM solves a problem that shouldn't be there (see Svelte below)
  • Accessibility (more an issue of how it gets used of course)
  • powerful backing isn't always a good thing: facebook aren't getting very good press in terms of their ethics lately
  • almost too popular: reduced competition can lead to stagnation and complacency. Too much noise when searching for solutions/libraries etc.

Alternatives:

  • Angular. More complete in that it provides structure for state management and an opinionated framework for adding things like services: less to think about; but less flexible and more to learn. Well established and backed by Google
  • Vue. I haven't used it but have heard good things. Seems to hit the sweet spot between React's flexibility whilst still providing a bit more structure
  • Svelte. Not yet properly established but pretty revolutionary: dispenses with the virtual DOM by compiling the framework functionality into the output. Achieves really good performance whilst keeping a comparatively tiny bundle size. Also has a really nice developer experience. I'd totally recommend it for small personal projects or as a more straightforward introduction to component-based frameworks. In the long term it still has to prove whether it works well at scale.
Collapse
 
savagepixie profile image
SavagePixie

Thanks for your comment. I share several of your likes and dislikes.

You have intrigued me with Svelte. I'll have to add it to my list.