Re:New React website
by acemarke on Friday September 29, 2017 @12:08PM
(#15366522)
To add a bit of context: the React docs were previously a Jekyll site that was hosted at facebook.github.io/react/. The new site was rebuilt using Gatsby.js (a React-based static site generator), uses the Glamor CSS-in-JS library for styling, and has a bunch of nice tweaks and improvements overall, like the live component editors on the front page.
[ Parent
| on HN ]
Re:New React website
by bluetidepro on Friday September 29, 2017 @12:32PM
(#15366748)
Wow, just checked out Gatsby.js for the first time. This library is incredible. Glad you mentioned it! :)
Re:New React website
by SkyPuncher on Friday September 29, 2017 @01:29PM
(#15367267)
I cannot overstate how nice it is to use. I built a sign-up page for a startup with it and I had absolutely no complaints.
Writing static content is basically like building a normal website with a nice templating system. Dynamic content is simply React components that I'm use to working with on complex applications.
Easy to build, easy to deploy, and easy to change.
That's great to hear!
Re:New React website
by futurefriendly on Friday September 29, 2017 @01:23PM
(#15367194)
Gatsby is great but it has issues generating sites with a large number of pages. There are performance issues and generation fails if the number of pages goes above a certain threshold.
I had to abandon it for a project that was generating static SEO pages, it was something on the order of 2000 pages and Gatsby couldn't handle it. Hopefully they resolve that soon!
Apparently the latest React significantly improves server-side rendering, so it might be worth giving Gatsby a try again even just with the React package updated to the latest version (and I'd love to hear what the speed increase is).
I abandoned my own React-based SSG because it was slow, but I'm hoping to dust it off when I have some more time to see the effects.
Sorry to hear that! We're focusing on build performance and incremental site builds and will be releasing a major version bump by the end of the year to make the experience faster.
Re:New React website
by futurefriendly on Friday September 29, 2017 @04:31PM
(#15368885)
Glad to hear it! I think Gatsby is fantastic and I'm still looking for other projects to use it on. I love how unobtrusive the framework part of it is, feels like just writing a vanilla react/redux app. The GraphQL data layer is inspired!
Re:New React website
by kylemathews on Friday September 29, 2017 @05:44PM
(#15369514)
Awesome! Yeah, that was our main design focus. Make it feel like you're building a vanilla React web app but make it as speedy as the fastest websites.
>Hopefully they resolve that soon!
Or, hopefully, they don't. SEO pages suck users time.
Re:New React website
by futurefriendly on Friday September 29, 2017 @05:38PM
(#15369460)
I can see how you'd have that perception but the term covers a wide swath of use cases. Search engine spam is not nearly the issue it once was. Most SEO pages are created to account for two things: product marketing content cannot contain all the possible terms that people use when searching without becoming unintelligible and data served dynamically through SPAs, especially geographically localized data, is still challenging to expose to search engines even with universal apps.
Re:New React website
by free_everybody on Friday September 29, 2017 @01:37PM
(#15367351)
Could you fill me in? Why do SEO pages suck users time? I'm a newbie.
SEO pages are crap meant to make a site with otherwise no interesting content (else it would have used that) rank higher on Google.
Can you change the docs section dropdown interaction? When I go to look at the docs, it's really nice to be able to see everything instead of opening each major section one at a time (especially when opening one closes all the others).
Where are they using Glamor? Trying to find some code in action but can't search on mobile.
I think editors was already there.
They might have had _something_ on the front page before, don't remember what exactly. I know they had CodePen examples added in the "Getting Started" and "Tutorial" sections when the docs content was rewritten last year. The use of the React-Live editor widget on the front is specifically new, I just don't remember if it replaced something similar previously.