Skip to content

Conversation

@thomaswhyyou
Copy link
Contributor

@thomaswhyyou thomaswhyyou commented Nov 5, 2025

Description

Add a page to cover KnockGuideLocationSensor, and a smattering of small edits.


Note

Adds docs for KnockGuideLocationSensor (with Next.js/TanStack examples) and updates guides rendering docs with clearer SDK usage, examples, and FAQs.

  • React SDK docs
    • Add content/in-app-ui/react/sdk/components/knock-guide-location-sensor.mdx and typedoc typedocs/react-core/components/knock-guide-location-sensor.mdx with Next.js and TanStack Router usage.
    • Update sidebar (data/sidebars/inAppSidebar.ts) to include KnockGuideLocationSensor under React components.
    • Minor example tweak in typedocs/react-core/components/knock-guide-provider.mdx sample usage component name.
  • Guides docs
    • Refine content/in-app-ui/guides/render-guides.mdx: clearer fetching overview, React-specific key resources, info callout, FAQ clarifications on useGuide vs useGuides (ordering/throttling), and example updated to guide.steps[0].
    • Add info callout in content/in-app-ui/react/headless/guide.mdx recommending KnockGuideLocationSensor for Next.js/TanStack Router.

Written by Cursor Bugbot for commit 819d92f. This will update automatically on new commits. Configure here.

@linear
Copy link

linear bot commented Nov 5, 2025

@vercel
Copy link

vercel bot commented Nov 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Nov 5, 2025 10:44pm

#### Key SDK resources

When working with Knock's SDKs to fetch and render guides, you'll use the following components and hooks:
When working with Knock's SDKs to fetch and render guides, you'll use the following components and hooks for React:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All of these are React specific, so making that clear.

- [**useGuides**](/in-app-ui/react/sdk/hooks/use-guides). Hook to fetch multiple guides.
- [**useGuideContext**](/in-app-ui/react/sdk/hooks/use-guide-context). Hook to access the guide client for advanced use cases.

Follow this [step-by-step example](/in-app-ui/react/headless/guide) to set up the provider and render your guide components in your React application.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should link to the code example from this page earlier, per this slack thread discussion.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm taking a look at where we could move this 👍

<h3>{guide.step.content.title}</h3>
<p>{guide.step.content.body}</p>
<h3>{guide.steps[0].content.title}</h3>
<p>{guide.steps[0].content.body}</p>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

trackLocationFromWindow={true}
>
<GuideRenderer />
<MyGuideComponent />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

"GuideRenderer" might sound like something included in the SDK, whereas "MyGuideComponent" communicates something you need to provide.

Copy link
Contributor

Choose a reason for hiding this comment

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

great callout 💯

@@ -0,0 +1,56 @@
A React helper component intended for use with select supported frameworks, such as [Next.js](https://nextjs.org/) and [Tanstack Router](https://tanstack.com/router/), for detecting route changes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A new page covering the KnockGuideLocationSensor helper component.

@thomaswhyyou
Copy link
Contributor Author

@scoti-knock Your edits look great to me, thanks you for that! I cannot approve this PR since it was me that opened it, but if you feel good with it, then we can ship this whenever you have a chance to approve.

Copy link
Contributor

@rachael-t rachael-t left a comment

Choose a reason for hiding this comment

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

Looks good - thank you both for these updates!

@thomaswhyyou thomaswhyyou merged commit ea64501 into main Nov 6, 2025
5 checks passed
@thomaswhyyou thomaswhyyou deleted the thomas-kno-10416-doc-fix-useguides-example-code branch November 6, 2025 18:10
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.

4 participants