3 ms·
I recently wanted to do a small project in React and found this site: https://reactjs.org/docs/add-react-to-a-website.html https://reactjs.org/docs/add-react-to
by npinsker 7y ago
I recently wanted to do a small project in React and found this site: https://reactjs.org/docs/add-react-to-a-website.html https://reactjs.org/docs/add-react-to-a-website.html. It was a painless, plug-and-play solution that got me coding within 3 minutes. I didn't need any data from external APIs. Obviously Gatsby would have been overkill here -- but that left me wondering why anyone would use Gatsby at all, since it's billed as "the static React site generator", and I had done that easily without it.
This tutorial is appropriately concise and answered my question perfectly: Gatsby's main use case seems to be when you want to repeatedly generate a static site dependent on some data source changing (e.g. blogs, online stores, etc.)
- trufas 7y agoThe main advantage is Gatsby pregenerates the initial markup for your website, so it loads faster and can work OK without JS. That example from the React docs has to load the JS bundle before showing any content and won't render at all if Javscript is disabled
- theflyinghorse 7y agoThank you, that's precisely what I've been looking for but have not been able to put into a google search!