@lunardinos/recorder-tanstack-router
v0.1.2
Published
[Lunar Dinos](https://lunardinos.com) session recording SDK for apps using [TanStack Router](https://tanstack.com/router).
Downloads
184
Readme
@lunardinos/recorder-tanstack-router
Lunar Dinos session recording SDK for apps using TanStack Router.
Captures session replays, page navigations, clicks, inputs, and errors — with zero configuration beyond wrapping your app.
Installation
npm install @lunardinos/recorder-tanstack-routerSetup
Wrap your app with RecorderProvider inside your router context:
import { RecorderProvider } from "@lunardinos/recorder-tanstack-router"
function App() {
return (
<RecorderProvider apiKey="your-api-key">
<Outlet />
</RecorderProvider>
)
}Route changes are tracked automatically via TanStack Router's useMatches().
Identifying users
import { useRecorder } from "@lunardinos/recorder-tanstack-router"
function Dashboard() {
const { identify } = useRecorder()
useEffect(() => {
identify({
user: { id: "user-123", email: "[email protected]" },
account: { id: "acme", name: "Acme Inc" },
})
}, [])
return <div>...</div>
}Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| apiKey | string | required | Your Lunar Dinos API key |
| endpoint | string | https://ingest.lunardinos.com | Custom ingestion endpoint |
| enabled | boolean | true | Disable recording (e.g. in dev) |
Learn more
Visit lunardinos.com to get started.
