Created
February 2, 2022 19:59
-
-
Save remotesynth/c020569caa1dd7af83b4bcfa42970c3a to your computer and use it in GitHub Desktop.
Next.js _app.ts with LaunchDarkly
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 { 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