9,458 karma · joined November 20, 2009
So, React is just a view library. It's made to map state to DOM changes. Except it's not just a view library, because if you write an app with React, you are writing a React app. You slice and dice your view up and put them into React components. Now, since you want to use your React components on the server and not slice and dice them up again in another view library, you morph that DOM-manipulating lib into a templating engine that generates static HTML. Except you call it "server side rendering", because "templating engine" sounds so 2010 and "static site generation" is also not the right term, because the output isn't a static HTML page, but can change with every page request. Of course, the "React" part of React is completely ditched in SSR, because you don't need to continuously modify the DOM based on your state. React on the server is what PHP templates have been doing forever. Outputting HTML in PHP is "view = f(state)". We've come full circle.
I sometimes wonder if younger web devs even understand that SSR isn't, like, really rendering a page on the server, but basically means "we produce frickin HTML like we've been for the last 30 years, except our tools are now 10x as complex to such a point that we don't understand them anymore", because 90% of our view library does nothing on the server, because, you know, there is no DOM. There is only HTML as a string send over HTTP.
Having said that: Your analysis is completely correct. The discussion really is orthogonal and I'm not sure I see the point in rendering web components on the server, since most web components benefit from interactivity through JS. If I merely encapsulate a bunch of HTML tags, I can ditch the custom element entirely and send the HTML tags down the wire by themselves.
https://web.archive.org/web/20150414080539/http://hackflow.c...
<div id="json-tree"></div>
...
const container = document.getElementById('json-tree');
container.innerHTML = generateJSONTree(jsonData);
You'd have this: <json-tree id="json-tree"></json-tree>
...
const container = document.getElementById('json-tree');
container.jsonTree = jsonData;
Attributes not necessary, simply pass the json data as a prop. Granted, the difference isn't that big, but this is where web components shine.I don't dismiss it as completely useless, because it pointed me in the correct direction a couple times, but you have to double-check everything. In a way, it might help me learn stuff, because I have to read its output critically. From my perspective, the success rate is a bit above 0, but it's nowhere close to "magical" at all.
If you talk about taxes percentage-wise, you make clear that the super-rich do not pay their fair share, that they will get richer faster than everybody else and, the most important fact, that long-term stability might suffer, because the bigger the divide between rich and poor, the more civil unrest follows.
> And yet most obese people are no more addicted to food than you are addicted to oxygen...
Most obese people seem to be addicted to sugary food, soft drings, desert and all that, which then triggers more eating.
In addition, it might be a gut bacteria thing. If your gut is used to processing lots of sugar, you crave it even more and fighting your gut microbiome requires way too much impulse control and moderation.
The solution might be to recognize this mechanism, remove all sugar from the diet and find a way to control impulses for a few weeks until the gut bacteria changed.
Drinking water and chewing sugar-free gum helps me to remove food cravings temporarily with no downsides. But... I have a normal weight.
This is an ongoing theme since I first checked out this website, which was in 2008 or so.
Now imagine the thousands of factors that happen during pregnancy that probably influence the neurodevelopment of a human and which artifical womb doesn't take into account. Simple things such as: hearing and feeling the heartbeat of the mother, feeling the environment, heat, cold, being carried through life and so on.
This way, the biggest downsides (moving between pages & requiring an internet connection) are eliminated.
But if your app requires an internet connection and multiple pages, it's better to let the browser handle navigation in a fault-tolerant way.
Google has "build an ad profile about every human being" in their DNA just like Facebook, employing similar creepy tactics with Gmail and Chrome.
if Referer != ''If you get a new watch, beware of the Milanese loop: it tends to destroy the fiber of long sleeve shirts.