Skip to content

Instantly share code, notes, and snippets.

@remotesynth
Created February 2, 2022 19:59
Show Gist options
  • Save remotesynth/c020569caa1dd7af83b4bcfa42970c3a to your computer and use it in GitHub Desktop.
Save remotesynth/c020569caa1dd7af83b4bcfa42970c3a to your computer and use it in GitHub Desktop.
Next.js _app.ts with LaunchDarkly
import { AppProps } from 'next/app'
import '../styles/index.css'
import { withLDProvider } from "launchdarkly-react-client-sdk";
function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />
}
export default withLDProvider({
clientSideID: process.env.LAUNCHDARKLY_SDK_CLIENT!,
})(MyApp as ComponentType<{}>);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment