Replies: 1 comment
-
I'm in the middle of investigating nextjs capabilities for potential future solutions, and stumbled across this. Being unfamiliar with nextjs, I don't know much about the trickiness that might arise from the intermingling of it and firebase, but I do know that you can still take advantage of the cdn caching. Of course, if your page updates frequently, you'd want to use your judgement on how long the CDN cache should last, but it avoids the issue of your server getting potentially hammered, off shooting subsequent requests to the cdn assets. Hope that helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have recently started learning next.js and integrating it with Firebase. So, I might be wrong but this is my take:
Suppose we have next.js website which DOES NOT use
getServerSideProps
andgetInitialProps
.We now configure Firebase to serve our next.js website from Firebase cloud functions instead of firebase hosting and suffer from these:
Almost all articles on the web including next.js and firebase are about setting up firebase functions to host next.js website. I just don't get it! Why can't we use firebase hosting and to show personal data (user profile,dashboard) show a static page first and then fetch the personal data from client side using rest api.
Examples from next.js repo suggesting to use firebase functions for hosting next.js:
on a seperate note, it's way too complicated to setup firebase like this. Even the official repos are outdated and doesn't work for latest version.
Beta Was this translation helpful? Give feedback.
All reactions