Providers with the new app directory
Unanswered
European pilchard posted this in #help-forum

European pilchardOP
If i wanted to do something such as wrapping my application in a provider with pages directory, i would have something like
in
How would I do this when using only the app directory?
export default function App({
Component,
pageProps: { session, ...pageProps },
}: MyAppProps) {
return (
<SessionProvider session={session}>
<Component {...pageProps} />
</SessionProvider>
);
}
in
pages/_app.tsx
How would I do this when using only the app directory?
1 Reply

European sprat
the same way except you'd put the providers component in the root layout file