Mixing HTML and server side code may let you do toy projects quickly, but in the real world it's a great recipe for building an unmaintainable, undifferentiated, monolithic mess.
JSX is no longer my friend
41–50 of 144 posts
Re: JSX is no longer my friend
#42Finally, 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?
Exactly this. Can someone explain to me what do people see in JSX way of creating components? What happened to good ol' code vs template separation and what's now wrong with having two separate files - .html (or jade, or whatever) and .js?
Re: JSX is no longer my friend
#43This seems plenty easy to read and write and has the benefit that it's pure JS and doesn't need to be compiled during development:
const listItem = item => `${item.name}`
const listComponent = items => `${items.map(listItem).join("")}`Re: JSX is no longer my friend
#44After 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 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 so far.
Re: JSX is no longer my friend
#45After 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…
Note that the author isn't suggesting a return to separate template pages. He is suggesting a system for creating React elements that uses simple functions and JavaScript syntax rather than the custom syntax of JSX.
Re: JSX is no longer my friend
#46Re: JSX is no longer my friend
#47I'm wondering what the advantages of JSX are now in a world with ES6 template strings? This seems plenty easy to read and write and has the benefit that it's pure JS and doesn't need to be compiled during development: const listItem = item => ` ${item.name} ` const listComponent = items => ` ${items.map(listItem).join("")} `
Re: JSX is no longer my friend
#48And the context switch has not proved to be a problem for me, but I'm sympathetic to the argument.
Re: JSX is no longer my friend
#49After 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…
Re: JSX is no longer my friend
#50I'm wondering what the advantages of JSX are now in a world with ES6 template strings? This seems plenty easy to read and write and has the benefit that it's pure JS and doesn't need to be compiled during development: const listItem = item => ` ${item.name} ` const listComponent = items => ` ${items.map(listItem).join("")} `