News for hackers. Stuff that matters.
Re:Things every React.js beginner should know by lukesan on Monday January 25, 2016 @10:46AM (#10967765)
What really bothers me about React (and other frameworks) that without JS you do not see anything. No fallback. No progressive enhancement. Is this really the way to go? Did JS replace HTML/CSS as the backbone of websites/applications ?
Re:Things every React.js beginner should know by andrewingram on Monday January 25, 2016 @10:54AM (#10967807)
This isn't strictly true. Though the workflow isn't ideal yet, it's perfectly possible to build a React project which is initially rendered on the server and then progressively enhanced. I've done it before, as have others.

In fact, my single biggest criteria for any tech I add to my stack is that it doesn't get in the way of server-side rendering (the second biggest criteria is that it doesn't add significant weight to the client-side JavaScript payload).

Re:Things every React.js beginner should know by lukesan on Monday January 25, 2016 @11:16AM (#10967973)
Sounds great. Do you know any good resources for building a react application by progressive enhancement?
Re:Things every React.js beginner should know by swah on Monday January 25, 2016 @11:30AM (#10968053)
Google "server side React rendering".
Re:Things every React.js beginner should know by mbrock on Monday January 25, 2016 @12:08PM (#10968341)
That's not generally true. React is specifically designed to support progressive enhancement. It lets you render your pages on the server, and then the client-side JavaScript will work smoothly with the existing DOM. Redux is a popular state management library for React and it is also specifically engineered to make server rendering painless. All you need to do on the server is load the relevant JSON state for the given URL and give it to React.
Re:Things every React.js beginner should know by matt4077 on Monday January 25, 2016 @10:56AM (#10967825)
There are ways to render the output on the server, which helps search engines, first-page load times and Richard Stallman
Re:Things every React.js beginner should know by LeonM on Monday January 25, 2016 @12:12PM (#10968377)
+1 for the Stallman pun, so true
Re:Things every React.js beginner should know by Ronsenshi on Monday January 25, 2016 @03:09PM (#10969599)
I'm with you on this one. Although I use React actively I still have problems with the fact that you won't see content of the app without JS on initial load. Sure, there's a matter of isomorphic applications where React renders content on server during first call, however after trying several times implementing it - just ended up abandoning that idea due to how massively complex various things become in certain cases with authorizations for users and so on.
Re:Things every React.js beginner should know by tomjen3 on Monday January 25, 2016 @11:48AM (#10968195)
In the cases where react makes sense - where the users change data together or where new data is often enough generated on the server, yes. Try to make Trello work as well as it does today without javascript - ain't happening, you would be reloading every few seconds in case somebody else has made some changes.

On e.g a newssite react doesn't make much sense though (except, possibly on the backend).

Re:Things every React.js beginner should know by camjackson on Monday January 25, 2016 @06:15PM (#10970758)
As others have mentioned, you can use the same React code to render on the server. I actually have a blog post about that too: https://camjackson.net/post/server-side-rendering-with-react
Re:Things every React.js beginner should know by bpicolo on Monday January 25, 2016 @11:57AM (#10968261)
And without JS you don't get real applications on the web. Dumb text is fine for web 1.0, 2.0, but modern web applications are expanding far beyond that. Are there ways to be abusive with JS? Sure. But JS is what enables web applications as opposed to just having text-on-page (newspaper 2.0).
Re:Things every React.js beginner should know by jjnoakes on Monday January 25, 2016 @12:09PM (#10968353)
This is simply not true. Ignoring the fact that "real application on the web" has no definition... very useful web pages can be created without JavaScript, and they can (quite easily) interact with the user by taking input and updating what they display.

Why is something like that useful? Accessibility, security, backward compatibility, ...

Re:Things every React.js beginner should know by adamors on Monday January 25, 2016 @01:48PM (#10969023)
Yes that's why they specifically said web applications not pages. You cannot create web application without JS.
Re:Things every React.js beginner should know by jjnoakes on Tuesday January 26, 2016 @10:44PM (#10978062)
Sure you can. As I explained above.
Re:Things every React.js beginner should know by overcast on Monday January 25, 2016 @11:59AM (#10968283)
Honestly, it's 2016. Running a modern web page and browser without javascript is just silly. You're losing out on a lot of quality of life features, that people just expect to be there. It's the equivalent of taking away a touch interface from modern mobile phones.
Re:Things every React.js beginner should know by draw_down on Monday January 25, 2016 @06:44PM (#10970902)
This is not really relevant to the topic of React. This is like complaining about C not having real booleans when people are trying to discuss clang.