Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

solid-posthog

chomnr244MIT1.0.3TypeScript support: included

Allows you to PostHog within SolidJS

solid, solid-component-library, solidjs, solidjs-component, typescript, npm, posthog, posthog-component

readme

solid-posthog

npm package MIT License

Integrates PostHog with the SolidJS environment.

Quick start

npm i solid-posthog
# or
yarn add solid-posthog
# or
pnpm add solid-posthog
import { PostHogProvider } from 'solid-posthog'
const App: Component = () => {
  return (
    <PostHogProvider apiKey="phg-token" options={{ debug: true }}>
      <div class={styles.App}>
        <header class={styles.header}>
          <img src={logo} class={styles.logo} alt="logo" />
          <h1></h1>
          <p>
            Edit <code>src/App.tsx</code> and save to reload.
          </p>
          <a
            class={styles.link}
            href="https://github.com/solidjs/solid"
            target="_blank"
            rel="noopener noreferrer"
          >
            Learn Solid
          </a>
        </header>
      </div>
    </PostHogProvider>
  )
}