Skip to content

Instantly share code, notes, and snippets.

@KrisKnez
Created June 9, 2023 01:19
Show Gist options
  • Select an option

  • Save KrisKnez/95889bc9f171d2919a476bbe4adaf70a to your computer and use it in GitHub Desktop.

Select an option

Save KrisKnez/95889bc9f171d2919a476bbe4adaf70a to your computer and use it in GitHub Desktop.
reactjs-social-login: window is not defined
// This problem occurs when using reactjs-social-login with a SSR metaframework.
// The solution below is for Next.JS. Your framework may do dynamic imports differently.
const LoginSocialInstagram = dynamic(
() => import('reactjs-social-login').then((lib) => lib.LoginSocialInstagram),
{ ssr: false }
);
@Kiranism
Copy link

Thank you G! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment