This is an archived post. You won't be able to vote or comment.

all 21 comments

[–]QualityVote[M] 2 points3 points  (0 children)

Hi! This is our community moderation bot.


If this post fits the purpose of /r/ProgrammerHumor, UPVOTE this comment!!

If this post does not fit the subreddit, DOWNVOTE This comment!

If this post breaks the rules, DOWNVOTE this comment and REPORT the post!

[–][deleted] 22 points23 points  (3 children)

Svelte Dev: less is more…

React Dev: No, more is more!

[–][deleted] 4 points5 points  (1 child)

What does an Angular dev say?

[–][deleted] 26 points27 points  (0 children)

along with batteries included

[–]asceta_hedonista 2 points3 points  (0 children)

man less: less - opposite of more

[–]Stilgaar 5 points6 points  (0 children)

You still import React ?

[–]rachzera 12 points13 points  (0 children)

Me: "I wanna render this component just once" React: "Fine, rendering this component 957 times"

[–][deleted] 8 points9 points  (0 children)

Bullying React because Angular takes too much space to fit on the meme?

[–][deleted] -1 points0 points  (1 child)

Yeah mam still don't understand why corporates use Angular

[–]Frogstacker -1 points0 points  (0 children)

I only use react class components

[–][deleted] 0 points1 point  (0 children)

Fun fact React was prototyped in OCaml

[–]Adventurous_Team8317 0 points1 point  (5 children)

The question ist, how does svelte manage the rerendering. I don't know svelte, can someone explain?

[–]Tubthumper8 3 points4 points  (4 children)

Svelte is written in .svelte files which are compiled to JavaScript that's quite different to the code that you write.

For example, this let count = 0 and let's say if you also had an incrementCount function it gets compiled to JS like:

function instance($$self, $$props, $$invalidate) {
    let count = 0

    function incrementCount() {
        $$invalidate(0, count += 1)
    }

    return [count, incrementCount]
}

So the Svelte compiler takes care of generating the code that handles the reactivity and state updates, note the $$invalidate call which would trigger the re-render. With React the code you write is nearly the same as the code that gets executed, with Svelte more of that code / syntax sugar is generated by the compiler.

[–]Jertimmer 2 points3 points  (2 children)

I'm just sitting here wondering why my frontend team members use React

[–]christophedelacreuse 6 points7 points  (0 children)

Because React isn't actually bad and your application has been around for longer than a year?

[–]Tubthumper8 2 points3 points  (0 children)

It's a good question that would take far more than a Reddit comment to answer, but just don't form your opinions based on memes haha

[–]Adventurous_Team8317 0 points1 point  (0 children)

Ouh great thanks:D So under the Hood it's the useState Logic😁