DEV Community

Discussion on: Is Angular Dead in 2022?

 
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