NextJS 13 Server Components with Firebase

323 Views Asked by At

Good day guys,

I haven't really seen much coverage on Firebase and using NextJS 13+ to get your firebase firestore data in your app with server components. So using the fetch api etc so that its rendered on the server.

Is this possible with firebase at all or are we for now stuck with "use client" components to do so?

1

There are 1 best solutions below

1
On

This might not specifically answer but I'm experiencing the same thing trying to work out how to approach things (added complication that I'm in a create-t3-app world so tRPC to contend with) but I'm currently working through this guide where it leverages both the admin SDK and client side

https://firebase.google.com/codelabs/firebase-nextjs#0

and supporting code

https://github.com/firebase/friendlyeats-web/tree/master/nextjs-end