Hacker News new | ask | show | jobs
by khmii 1221 days ago
I feel like I live in the Twilight Zone because to me data visualization with a VDOM seems much smoother than without like in Svelte even though data visualization is supposed to be a strong point of Svelte.

As someone who has only really got up to speed with React in the past year, I can't understand why people hate on React. Much of the hate has to be residual hate for Meta.

Svelte to me seems like a mess. $:variables seems like an absolutely terrible idea. Maybe it is a good idea if you are a genius but I assure you I am not and can do absolutely confusing and crazy things with $:variables.

1 comments

> As someone who has only really got up to speed with React in the past year, I can't understand why people hate on React.

I'm not sure where the people you are hearing from are coming from, but I can tell you why I personally hate on React.

It has nothing to do with VDOM or its underlying tech, it is its design.

React gets treated as if it's a framework but is just a view library that gives you the ability to create components.

However, even that ability is rather lacking compared to a framework like Angular. Now, people hate on Angular too for various reasons but to stay on topic I won't digress into that.

Things I'm missing OUT OF THE BOX (yes I know there are 12 billion libraries "for that" that came out this week alone) with React are:

- View encapsulation (styles bound to components)

- A templating language that lets me separate a component's markup from its JavaScript

- Native typescript

- Inversion of Control / dependency injection framework

- Native routing that lets me configure my routes as metadata instead of having to use components, which ought to be strictly view / presentation only.

Working with inherited React code often reminds me of working with PHP in the 90s. Lots of markup mixed with lots of logical operations written by developers who don't know the first thing about separation of concerns, design patterns or layered architecture but the barrier to entry is low so they picked it up and were able to get stuff done with it despite not having any guidance what-so-ever on how to write maintainable code with a long shelf-life.