DEV Community

Discussion on: Is Angular Dead in 2022?

Collapse
 
sarcevicantonio profile image
Antonio Sarcevic

SvelteKit FTW :)

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

React > Svelte

Collapse
 
sarcevicantonio profile image
Antonio Sarcevic

less features, more code, bigger bundle, worse performance ... 🤷‍♂️

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

Bigger bundle on hello world apps yes, but once you have an bigger app react is smaller. Also less built in features(maybe) but overall more feature because of ecosystem, worst performance, nahh do you feel it?

Thread Thread
 
heydan83 profile image
Adan Ulloa

Svelte is faster because of the way it was designed without the virtual dom. That doesnt mean you will feel the diference on a modern pc. But been faster means that your application will be compatible with older devices or IoT devices which doesnt have that big of a hardware.

Collapse
 
mellunar profile image
mellunar • Edited

Yeah, because it's better to keep on:

import React, { useState } from 'react';
function Component() {
  const [count, setCount] = useState(0);
}

Enter fullscreen mode Exit fullscreen mode

instead of:

let count = 0;
Enter fullscreen mode Exit fullscreen mode

🤷

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

You got hooked by the popular talk but lets be real there will always be people who like the react way more its just a function which returns UI no matter ho clean svelte or any new framework that comes out is there will always be people who like the react way more.

Thread Thread
 
sarcevicantonio profile image
Antonio Sarcevic

we got hooked by the underlying philosophy that creating interactive UI doesn't need to be a chore :D

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

But it isn't for everyone, as I already said there are people who will always like the react model no matter what comes out because they come maybe more from a programming background first, in programming you build an application by composing functions together that do a certain job. In react you use functions and each one returns a piece of UI and its logic which makes sense and people build UIs that ways easier.

Thread Thread
 
kresli profile image
Eduard Jacko • Edited

@mellunar The React example is not a valid component ;) Maybe you should write an actual simple component as you are pointing to difference between state management only. This is more fair to compare

<script>
    let name = 'world';
</script>
<h1>Hello {name}!</h1>
<button on:click={() => name = "Hi"}>click me</button>
Enter fullscreen mode Exit fullscreen mode

vs



function Greeting() {
  const [state, setState] = useState("world")
  return (
      <>
          <h1>Hello  {state}!</h1>
          <button onClick={() => setState("Hi")}>click me</button>
      </>
  )
}
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic • Edited

A javascript function body is your script tag in Svelte the javascript return is your svelte file for markup, some people like programming some like XML style.

Thread Thread
 
sarcevicantonio profile image
Antonio Sarcevic • Edited

Implying writing HTML isn't programming

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

Writing jsx is.

Thread Thread
 
sarcevicantonio profile image
Antonio Sarcevic

Im glad you feel superior for making your life harder 🤣

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

I'm sorry for you that your brain can't grasp it.

Some comments have been hidden by the post's author - find out more