Live data from Hacker News

JSX is no longer my friend

medium.com

61–70 of 144 posts

Re: JSX is no longer my friend

#61
This person and the person he quotes seem to be quite confused about what JSX is and how it works. Hyperscript looks cool and use it if suits you but I don't think most of these reasons are valid nor actually make sense (like https://twitter.com/andrestaltz/status/674313202197520384?re... isn't related to JSX at all)

Re: JSX is no longer my friend

#62
post #44
post #28

After many Medium posts of uninformed, not very insightful complaints about react and the state of JavaScript I am becoming inclined to just avoid Medium posts about JavaScript in general. Medium has become the analog to Tumblr posts for opinionated engineers to whine about things that don't really impact development in ways that matter. Really all this developer had to do was talk about Hyperscript in a positive way…

Seriously. If you like it, use it. If you don't like it, don't use it. If you work with a team, take a vote. This post spends quite a bit talking about beginners who are learning Javascript, React, and JSX all at once. Of course they aren't going to get it right immediately, if they didn't get tripped up on JSX they'd get tripped up on something else. "Beginners don't get it" might be the weakest argument I've heard…

This is a dangerous opinion and one that weighs the present too heavily over the future.

Pick languages/frameworks that will produce easily maintainable code and will survive naturally after your departure from a company. New developers have a learning curve no matter what. The steeper you make that curve, the more danger you put your codebase in and the more likely you are to set them up to fail.

Re: JSX is no longer my friend

#63
post #12

Finally, somebody said it. I thought we abandoned that garbage when we left PHP, and now all of a sudden everybody wants to start mixing markup and code again?

We abandoned mixing view logic with program logic. It's perfectly reasonable to use PHP as your template engine as long you don't mix your program logic into your templates.

React is a view engine; everything done in react is to construct and maintain the view.

Re: JSX is no longer my friend

#64

This needs to be prefaced: this argument is overdone. JSX is not hard to learn. It's an order of magnitude better than the hampered DSLs of handlebars or dust, and I'm concerned that any engineer is so scarred that learning it takes more than 5-10 minutes of RTFM. After all, TFM on JSX is all of 200 words or less [1]. I've been using JSX since React 0.4. React's greatest strength is its simplicity. You can read all o…

I'll know the answer to your question in a couple weeks. I'm working with web content developers who are very good with HTML and CSS but less familiar with JavaScript. We have a project using Mithril (architecturally like React) where we started out without MSX (exactly like JSX) but they think they're going to prefer MSX syntax so we've begun switching over.

Re: JSX is no longer my friend

#65
post #44

Earlier quoted context omitted.

Seriously. If you like it, use it. If you don't like it, don't use it. If you work with a team, take a vote. This post spends quite a bit talking about beginners who are learning Javascript, React, and JSX all at once. Of course they aren't going to get it right immediately, if they didn't get tripped up on JSX they'd get tripped up on something else. "Beginners don't get it" might be the weakest argument I've heard…

This is a dangerous opinion and one that weighs the present too heavily over the future. Pick languages/frameworks that will produce easily maintainable code and will survive naturally after your departure from a company. New developers have a learning curve no matter what. The steeper you make that curve, the more danger you put your codebase in and the more likely you are to set them up to fail.

I agree, a better process than voting would be "evaluate the advantages and disadvantages of each practice and determine which results in the highest quality, most maintainable code."

But since when have we been any good at identifying future needs or identifying maintainable code? Just be consistent, try to at least leave SOME documentation for the next guy, and don't be actively malicious.

Re: JSX is no longer my friend

#66
post #24
post #16

Earlier quoted context omitted.

Well, it is just plain wrong. Even if you wanted to do a for loop in JSX you'd do {for (var x=0;x }} Not a templated component like that. That said, I have created repeater components and the like before, largely because JSX is so friendly that more design-minded people can use it very easily. EDIT: turns out that doesn't actually work, ha. I've never written JSX that way. {[0,1,2,3].map((i) => { }} on the other hand…

Generally speaking, I do not recommend this pattern. My preference is to handle enumeration within a function, for example: {this.listItems(items)} Then, within a function implemented on the same component: listItems: function(items) { items.map((item) => { return {item.name} }); }

Is it just me, or is the return missing in the `function` (or am _I_ missing something :)? Not important of course, just pointing it out...

Re: JSX is no longer my friend

#69
as much as people bash Angular, it was a relief just being able to take HTML code from a designer, sprinkle some ng- attributes and watch it come alive. I didn't even need to learn anything, it just made intuitive sense.

Unfortunately, as much as I want to learn React.js, there was too much context switching.

The only reason I'm persisting is because of react native. As soon as somebody comes up with a better way I'm ditching react

back to my good ol' jQuery

Re: JSX is no longer my friend

#70
post #28

After many Medium posts of uninformed, not very insightful complaints about react and the state of JavaScript I am becoming inclined to just avoid Medium posts about JavaScript in general. Medium has become the analog to Tumblr posts for opinionated engineers to whine about things that don't really impact development in ways that matter. Really all this developer had to do was talk about Hyperscript in a positive way…

This has been my view as well. Author comes off across as a 'tumblrina' and sort of obsessing over small annoyance rather than a serious writing on providing insight for real engineers who have better things to do than whine on medium
Post reply on HN