UNPKG

@posthog/wizard

Version:

The PostHog wizard helps you to configure your project

31 lines (29 loc) 1.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getReactNativeDocumentation = void 0; const getReactNativeDocumentation = ({ language, host, projectApiKey, }) => { return ` ============================== FILE: Modify the entrypoint for the app code LOCATION: Usually app/_layout.${language === 'typescript' ? 'tsx' : 'jsx'}, app/index.${language === 'typescript' ? 'ts' : 'js'}, App.${language === 'typescript' ? 'tsx' : 'jsx'} or something similar. There is only one entrypoint file, so you should edit the existing one. ============================== Changes: - Add the PostHogProvider to the root of the app in the provider tree. If other providers are already present, add it in a suitable location. Example (with the correct API key and host): -------------------------------------------------- import { PostHogProvider } from 'posthog-react-native' ... export function MyApp() { return ( <PostHogProvider apiKey="${projectApiKey}" options={{ host: '${host}', enableSessionReplay: true, }} autocapture> ... </PostHogProvider> ) } --------------------------------------------------`; }; exports.getReactNativeDocumentation = getReactNativeDocumentation; //# sourceMappingURL=docs.js.map