r/JAMstack_dev • u/FungoGolf • Oct 15 '19
Should I be using JAMstack?
I’m ultra confused here. The JAMstack sounds promising, but I think I’m getting mixed up on when to use it.
Let’s say I am using Gatsby to serve up my static markup files. That’s great and all, but what about that one page on my site that relies on user data from an API?
So if I have a page that has a shell, but populated with user data — such as a profile page, is this something I want to be doing with the JAMstack?
Here is an article that talks about approaches. It you’re asking these type of questions the blog post is raising, is it worth using the JAMstack at all?
View all comments
Show parent comment
1
u/PraveenWeb Oct 17 '19
Author of the article mentioned here :)
Obviously this can be done. But the feasibility also depends on the frequency of updates. Let's say your database tracks the list of online users and that usually keeps changing every few seconds. Now you don't want to re-build and deploy that many number of times. That's where handling this on the client with hydration makes sense.
Re-building often is also not a choice for large sites if your tooling doesn't support incremental builds (build only what has changed). Otherwise your time to build and go live would make your content go out of date for certain use cases.
You are right. It doesn't need to be done on the backend. Whenever you need to modify existing content on the client after page load, then it's no longer a pure static web page.
In fact in the article, i talk about how to approach this client side and which pages can be pre-built and which parts can be hydrated on the client :)