Created
April 19, 2022 08:30
-
-
Save iampoul/605fb81edc70ee005e61bb35df11fc5f to your computer and use it in GitHub Desktop.
wrap react app in multiple providers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
// import 'as' alias to prevent naming conflicts | |
import { Provider as NextAuthProvider } from 'next-auth/client' | |
import { Provider as ReduxProvider } from 'react-redux' | |
export default function App ({ Component, pageProps }) { | |
return ( | |
<ReduxProvider> | |
<NextAuthProvider options={{ ... }}> | |
<Component {...pageProps} /> | |
</NextAuthProvider> | |
</ReduxProvider> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment