From 439ecbf20d4849ccc9fffbfed32a629068bb2fbf Mon Sep 17 00:00:00 2001 From: Lazar Nikolov Date: Tue, 8 Apr 2025 16:55:58 -0400 Subject: [PATCH] fix(tanstackstart): added missing imports, highlights, and typos --- .../javascript/guides/tanstackstart-react/index.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/platforms/javascript/guides/tanstackstart-react/index.mdx b/docs/platforms/javascript/guides/tanstackstart-react/index.mdx index cc623dd8e2306d..74aba817e9d7f9 100644 --- a/docs/platforms/javascript/guides/tanstackstart-react/index.mdx +++ b/docs/platforms/javascript/guides/tanstackstart-react/index.mdx @@ -132,9 +132,10 @@ Sentry.init({ Wrap TanStack Start's `createRootRoute` function using `wrapCreateRootRouteWithSentry` to apply tracing to Server-Side Rendering (SSR): -```tsx {filename:app/routes/__root.tsx} {5} +```tsx {filename:app/routes/__root.tsx} {3,6} import type { ReactNode } from "react"; import { createRootRoute } from "@tanstack/react-router"; +import { wrapCreateRootRouteWithSentry } from "@sentry/tanstackstart-router"; // (Wrap `createRootRoute`, not its return value!) export const Route = wrapCreateRootRouteWithSentry(createRootRoute)({ @@ -195,7 +196,7 @@ class MyErrorBoundary extends React.Component { // ... } -export const MySentryWrappedErrorBoundary = withErrorBoundary(MyErrorBoundary, { +export const MySentryWrappedErrorBoundary = Sentry.withErrorBoundary(MyErrorBoundary, { // ... sentry error wrapper options }); ```