Reputation: 422
I am building a web app for a startup from scratch and have decided to use react and graphQl to query mongodb with nodejs as my backend.
Gatsby.js seems to bundle react, graphql, and even redux with their framework, which is supported with many helpful plugins. So it seems like it could dynamically render content on the client side, and its also built for fast static rendering of the site on the client side. Seems perfect for my use case where...
Some features of this site would require dynamic AND static rendering of content on the client side...
Before investing my time in Gatsby.js I want to know if its possible, or practice to use Gatsby.js for a mix of static and dynamic web rendering. are their better frameworks or solutions? or will this work?
Upvotes: 2
Views: 1480
Reputation: 1569
Gatsby.js seems to bundle react, graphql, and even redux with their framework, which is supported with many helpful plugins
Gatsby is a framework for React and uses GraphQL/Redux among other things under the hood - you can't use e.g. Redux out of the box and GraphQL is the data layer to query Gatsby's content, not external APIs. Hope that clears things up.
Before investing my time in Gatsby.js I want to know if its possible, or practice to use Gatsby.js for a mix of static and dynamic web rendering.
Of course :) That's why Gatsby re-hydrates into a fully functional React app on the client - so that you can fetch additional APIs or do dynamic stuff on top of the rendered HTML.
Might be an interesting read for you: https://www.gatsbyjs.org/blog/2018-11-07-gatsby-for-apps/
Upvotes: 4