News for hackers. Stuff that matters.
Re:JSX Mail: Ending All Your Problems When Creating Email Te... by tdeck on Wednesday October 05, 2022 @05:54PM (#33101668)
> Which of these two codes can you understand faster?

The first one, definitely! The first one shows the structure of the document and places the button in context. I cant actually tell that the second example is equivalent, since there's no "rest of the document" or if there is it's done by magic behind the scenes.

Edit: I don't want to come off as too harsh on this project, this example is relatively simple so it probably doesn't show off the power of programming your email templates as code.

Re:JSX Mail: Ending All Your Problems When Creating Email Te... by Theryston on Monday October 10, 2022 @07:26AM (#33150062)
there you have it, the example was so good that you even got it wrong, the first one was just a Button that would be reused in other files, but with all the code you thought it was an entire document, when in the second you obviously see that it's just a button component
Re:JSX Mail: Ending All Your Problems When Creating Email Te... by tdeck on Thursday October 13, 2022 @03:29AM (#33188249)
The first one has a <DOCTYPE> tag. When do you see that embedded within a larger document?