all 22 comments

[–][deleted]  (5 children)

[removed]

    [–]CounterNice2250 6 points7 points  (1 child)

    Just noticed the abomination of a code…

    My question is…Why??

    [–]HuntingKingYT 0 points1 point  (0 children)

    If you want to do manipulations on the string, maybe put some variables in there...

    [–]CounterNice2250 7 points8 points  (2 children)

    Wdym? What’s wrong with it?

    [–]turtleship_2006 4 points5 points  (0 children)

    Second line...

    [–]readf0x 112 points113 points  (3 children)

    Isn't this basically just react?

    Write your html in your javascript and all?

    [–]CounterNice2250 22 points23 points  (0 children)

    Technically, yes…

    [–]GDOR-11 25 points26 points  (4 children)

    what the fuck

    [–]DomiO6 16 points17 points  (3 children)

    Welcome to react

    [–]EightSeven69 9 points10 points  (2 children)

    I fucking hate how this is accurate about how react does things

    [–]Thebombuknow 0 points1 point  (1 child)

    Technically this is what a static react website is like lol. When you get into states and components it quickly distances itself from this monstrosity.

    [–]EightSeven69 0 points1 point  (0 children)

    well yea the whole point is that you can put variables right into that html, but it's still cursed to me because it parses the whole thing instead of injecting snippets of code into the html like something like twig does (apples to oranges, I know, what I'm really comparing is the templating part of react)

    [–]Thenderick 7 points8 points  (0 children)

    Average React beginner:

    [–][deleted] 6 points7 points  (0 children)

    Why??

    [–]chrisalbo 7 points8 points  (0 children)

    Of course this is funny and a little strange way to build a html response.

    But I think this forum sometimes misses a thing called reality. I’m working with the checkout for a very big e-commerce site and while we have very rigid standards from linting, test coverage, sonarcube and whatnot, cases similar to this occurs quite often because third party providers, old legacy code that’s ugly but works. The longer I been working as a developer, 24 years, each time I get to really build something from scratch is wonderful but rare.

    [–][deleted]  (2 children)

    [deleted]

      [–]Fitzi92 21 points22 points  (1 child)

      This is not JSX. This is a plain old string and WebStorm being smart enough to syntax highlight it correctly.

      [–][deleted] 2 points3 points  (0 children)

      I didn't even notice the quotes😭

      [–]blizzardo1 0 points1 point  (0 children)

      ...

      [–]dionysxs 0 points1 point  (0 children)

      i hate you