-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] key differences between gatsby and create-react-app #1458
Comments
Hi there. Gatsby, is similar is some senses but the end goal of each project is fairly different. Ultimately Gatsby is really "competing" against technologies like Jekyll vs CRA. To that end, Gatsby is a good bit higher level. It's intended to help build static sites quickly and optimizes for that use case. Practically that means you get server-side-rendering built in, and a whole robust data layer and plugin system for working with data, from CRM's like Drupal, Contentful, down to queryable metadata about react components and jsdoc comments in your source code. I'm glossing over a lot of what Gatsby does well, but i'd recommend sifting through the site (https://www.gatsbyjs.org/) and checking out some of the examples to see how it differs and which use cases it's better to choose one over the other. |
Tl;dr - difficult to add Redux or any state management pattern to Gatsby. Hey @johnryan, I googled with your same question and I've done some digging and I think there might be one more thing I can contribute that @jquense hasn't covered to this discussion if not for you but for someone else wondering. I started tying to see the difference by way of weighing the pros and cons, and I think a big point of distinction is that Gatsby relies on API calls to interface with a back end service. For the application I'm looking to set up, the client specifically has asked for Redux, so I think that makes Gatsby a difficult choice for me. I'm sure I could rubber-mallet the library into place, but I don't think being able to add libraries like Redux easily was the reason Gatsby was made. |
Hey Patrick, lots of people are using redux with gatsby. The setup is slightly different than with CRA but similar to other SSR setups. Checkout the redux example app https://github.com/gatsbyjs/gatsby/tree/master/examples/using-redux |
Example is broken as of today @KyleAMathews |
@tgrrr can you describe more how's it broken for you? I just installed fresh packages and ran gatsby develop and it's working as expected. |
@KyleAMathews , sorry I was unclear: Gatsby works great for me. To clarify, if you follow the link you just posted above:
The link in the readme.md https://redux.gatsbyjs.org is broken. I assume it originally linked to a redux demo? |
Ah gotcha :-) Wasn't clear what you meant. And yeah, never did setup that site. But it's up now at https://using-redux.gatsbyjs.org/ I'll update the README to the correct url. |
Closing thoughts — Gatsby is CRA w/ a data layer + more build opinions + runtime. Thanks for those that participated! |
CRA is a very good option if you want to stay away from frameworks. My motto is that concretions are certainly bad, when you use a framework they tell how to do do things, and sometimes you end up trying to fit a circle within a rectangle in order to make things work for your project. Gatsby on other hand is a concretion, it's a framework which means it's opinionated in many regards, and this translates into more overhead and things you will probably not use at all. I'd rather make a case study of my requirements and the things one solution offers over the other and start from there. Even though I feel more disengaged with CRA (and that's good) than with Gatsby, this decision should be based on evidence rather than on personal preferences. |
Hi, I was checking out gatsby and it seems like the workflow and features are very similar to
create-react-app
i.e. live dev server and a build command that builds minified js/css etc. I assume i'm missing something there so I was wondering if you could highlight what gatsby does differently there. Thanks!The text was updated successfully, but these errors were encountered: