Skip to content

Conversation

@gewenyu99
Copy link

Adds react router. Uses code in this examples PR and docs from this PR

@gewenyu99 gewenyu99 changed the title Add react router feat: react router agent Jan 8, 2026
@gewenyu99 gewenyu99 requested a review from a team January 8, 2026 20:04
integration: Integration.reactRouter,
docsUrl: 'https://posthog.com/docs/libraries/react',
unsupportedVersionDocsUrl: 'https://posthog.com/docs/libraries/react',
abortMessage:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, we can start to see the parts that are generalizable. We can probably live without a per-framework abort message. It's probably the same message each time, with the docs URL piped in for that framework


ui: {
welcomeMessage: 'PostHog React Router wizard (agent-powered)',
spinnerMessage:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably can share these between frameworks too

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True

import * as path from 'node:path';
import * as semver from 'semver';

export enum ReactRouterMode {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, all my homies love enums

Copy link
Collaborator

@daniloc daniloc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks right to me, can't wait to get it into testing. Couple things we can clean up for future integrations if you're up for it.

how was the DX of getting all this slotted in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants