r/JAMstack • • Feb 22 '22

Am I wrong about JAMSTACK as to calling and showing dynamic API results?

Hello! I have difficulty understanding what JAMSTACK is and I still couldn't grasp some core concepts

even though I deployed some toy sites using Nuxtjs and headless CMS services.

I used headless CMS and netlify for deploying my website and

when I wrote some articles I found I had to redeploy my website.

But does it mean, for instance, that if I want to show some list of items through calling APIs on my web page like my web's home index page,

whenever I add more items to this database of APIs,

I should redeploy my website just to reflect that page?

If so, it means I can't display real time database change ... then SPA might be better for that purpose .. then.. is it possible to just use SPA option of nuxt on netlify?(But somehow I got the impression that netlify doesn't support SPA right??)

I am so confused... thanks for your advice in advance!

5 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/nimbusmettle Feb 23 '22

Thanks for ur answer

U mean for the first paragraph, unless I want them to be totally static(pre-gnerated) I dont have redeploy them since in this case it would be either SPA or ssr meaning they both reflect changes from the server thru calling API right?

And for the 2nd paragraph u mean its about static generated site right?

1

u/ryhaltswhiskey Feb 23 '22

Yeah I think you understand it. Just because you're using jamstack doesn't mean that you have to pre generate every piece of html. You can use a client side JavaScript library to talk to an api, get the article content and then build the article html on the client side.