Earlier quoted context omitted.
The big reason I remember from my PHP days (late 90s early 2000s) is that you want to separate design from development. Graphic designers were expected to know HTML/CSS while developers focus on PHP.
That's never really been true. Graphic designers rarely knew HTML/CSS in the old days.
Things every React.js beginner should know
61–70 of 247 posts
Re: Things every React.js beginner should know
#62Earlier quoted context omitted.
In all fairness this is ancient history on the PHP world.
That's the point that pkrumins/andreyvit are making, code where logic and presentation are mixed turn into a nightmare to maintain. And the practice is now ancient history. Apart from here it is again...
Re: Things every React.js beginner should know
#63Earlier quoted context omitted.
Isn't that because it's really JSX? https://facebook.github.io/react/docs/jsx-in-depth.html [NB Not that I know, just checking my own understanding].
I hadn't heard about JSX before so I went to your link to check it out. This is just one of the most off-putting introductory statements I've ever read: JSX is a JavaScript syntax extension that looks similar to XML. Don't we all hate XML? How can you possibly even go on reading about this technology further if it's introduced like that.
I believe people hating XML has more to do with using XML as a data transfer format, right? I'm happy using XML for Android layouts but can't imagine using it as a replacement for JSON - which I think is where most of the hate comes from.
Re: Things every React.js beginner should know
#64I'm not a React or Angular expert, but do you really put HTML inside of your JS code? It just bothers me too much. We spent years in early web days learning that code and templates should be separate, yet here we are putting HTML inside of code, which goes against years of practice. Can anyone share their professional thoughts about this?
Putting HTML and JS in different files doesn't make them separated. They are still bound by logic. It's an imaginary separation with obscure dependencies. I very much prefer the React way of bundling things that in reality belong together.
It is only through laziness and lack of understanding that people couple them together.
Re: Things every React.js beginner should know
#65Earlier quoted context omitted.
Hey, thanks for this. With regards to redux-thunk, have you taken a look at redux-saga[0]? Any thoughts? [0] https://github.com/yelouafi/redux-saga
I've seen it mentioned by a few people, including Redux creator Dan Abramov (who is very open about tweeting links to 'competing' libraries!), but I've only taken a brief look so far. My initial impression is that it seems really interesting, although I wonder if the use of generators will scare people away. Many devs are already exhausted with the number of new JavaScript features they're being told to learn. I defi…
That said, Dan Abramov does seem to think it's a very intriguing approach, so it's worth keeping an eye on.
Re: Things every React.js beginner should know
#66Earlier quoted context omitted.
I hadn't heard about JSX before so I went to your link to check it out. This is just one of the most off-putting introductory statements I've ever read: JSX is a JavaScript syntax extension that looks similar to XML. Don't we all hate XML? How can you possibly even go on reading about this technology further if it's introduced like that.
XML is still used as a the standard for building layouts - on the web and on Android, and probably many other places. It can be much more readable than code for nesting components. I believe people hating XML has more to do with using XML as a data transfer format, right? I'm happy using XML for Android layouts but can't imagine using it as a replacement for JSON - which I think is where most of the hate comes from.
Re: Things every React.js beginner should know
#67Earlier quoted context omitted.
Isn't that because it's really JSX? https://facebook.github.io/react/docs/jsx-in-depth.html [NB Not that I know, just checking my own understanding].
I hadn't heard about JSX before so I went to your link to check it out. This is just one of the most off-putting introductory statements I've ever read: JSX is a JavaScript syntax extension that looks similar to XML. Don't we all hate XML? How can you possibly even go on reading about this technology further if it's introduced like that.
But if you're using XML to basically make a variant of HTML, it's great.
Re: Things every React.js beginner should know
#68Earlier quoted context omitted.
Isn't that because it's really JSX? https://facebook.github.io/react/docs/jsx-in-depth.html [NB Not that I know, just checking my own understanding].
JSX is a HTML-like template language that gets preprocessed to actual HTML.
It's not a text templating language like classic PHP, it's an object/function calls hierarchy DSL (more like vb.net XML literals). I think most people critisizing react for putting html in JS havn't tried it or don't remember why "html" in code was considered bad in the first place.
Re: Things every React.js beginner should know
#69I'm not a React or Angular expert, but do you really put HTML inside of your JS code? It just bothers me too much. We spent years in early web days learning that code and templates should be separate, yet here we are putting HTML inside of code, which goes against years of practice. Can anyone share their professional thoughts about this?
It does result in a tight coupling of template and code, but I'm yet to see a downside to that. Separating template and logic has been the dream forever but is never realised in any non-simple project. Embracing that coupling has been great for me.
Re: Things every React.js beginner should know
#70Earlier quoted context omitted.
I hadn't heard about JSX before so I went to your link to check it out. This is just one of the most off-putting introductory statements I've ever read: JSX is a JavaScript syntax extension that looks similar to XML. Don't we all hate XML? How can you possibly even go on reading about this technology further if it's introduced like that.
XML is fine. XHTML is XML, after all. The issues with XML are the kind of XML that is often created with it, with namespace nightmares, endless embedded tags, etc. etc. But if you're using XML to basically make a variant of HTML, it's great.
JSX is a JavaScript syntax extension that looks similar to HTML.