6 ms·
This is a great example of a modern looking website, that actually performs in a way one would expect from today's computers and browser optimizations. Instead
by Kaali 11y ago
This is a great example of a modern looking website, that actually performs in a way one would expect from today's computers and browser optimizations. Instead it seems to be more important for developers to use the coolest new technology, even though it actually hurts the end-users.
React is all the hype right now. And it is a nice system for creating dynamic single page apps. But there is little reason to use it for static websites, which could be cached easily, instead of rerendering the website on the client with Javascript. And instead of having automatically cached static website, we use local storage and such to get something resembling a cache.
I would love to see some mechanical sympathy in modern web development, instead of cargo culting all the new tech.
- vjeux 11y agoYou can use React to render static websites. You get the nice component model and the speed of static content. You can take a look at the react native[1][2] website for an example. [1] http://facebook.github.io/react-native/ http://facebook.github.io/react-native/ [2] https://github.com/facebook/react-native/blob/master/website/core/Site.js https://github.com/facebook/react-native/blob/master/website...
- ivan_ah 11y agoThat's pretty cool way to structure websites: https://github.com/facebook/react-native/blob/master/website/layout/DocsLayout.js https://github.com/facebook/react-native/blob/master/website... The chain of build steps is quite complex though... but hey, if it works...
- jhgg 11y agoWe've got our entire marketing site statically rendered. Looking forward to react 15, should get rid of lots of "data-reactid"s which should shave a bit off of the size of the rendered html.
- madeofpalk 11y agoYou can actually do that at the moment with ReactDOMServer.renderToStaticMarkup(), which doesn't create any react-ids (but can't be used later by React on the client)
- qznc 11y agoMechanical sympathy implies that you tailor for very specific use cases. For example my blog: Most visitors read a single article and leave. Optimization: Serve page as one big blob if possible. Inline the CSS. Avoid images and widgets. Social buttons are implemented as CSS-styled links without Javascript-iframe-img stuff.
- mbrock 11y agoThere's also such a thing as cargo cult criticism... when dismissing stuff as "hypes" and "trends" without really grasping the reasons behind the enthusiasm... for example, how one of the big advantages of React is that it can render on the server in a very convenient way.
- Kaali 11y agoTrue. I shouldn't have been that dismissive about React. My comment was really related to the explosion in popularity of client side rendered static websites. And React happens to be one of the more popular ways to implement them.
- tobltobs 11y ago> React is all the hype right now. React is old school, the cool kids use VueJS nowadays.
- bryanrasmussen 11y agoWell in this case the coolest new technology seems to be AMP, the use case for which is not so plain to anyone who knows how to make a modern looking website that actually performs in a way one would expect from today's computers and browser optimizations.