Why is there no SessionProvider wrapping app in next13+ app router boilerplate?
When comparing a t3 app boilerplate with nextauth in pages directory vs app router, the _app.tsx in page directory is wrapped in an SessionProvider and not in app arouter.
Why is this so?
4 Replies
from my understanding, it's wrapped in SessionProvider to make sure session data is accessible to any component
hope this helps :)
With the app router you can get the session on the server and pass it to the client as a prop
So can i add SessionProvider to a app directory app, so that I can use client side firebase hooks in my client componets?
or should be only be using SessionProvider in nextjs^12 with pages directory?
you can add it
that being said while im not familiar with firebase i don't see why you would need to get the session on the client to use it