From ceba33a2b3c9bad4236aec59794869052910291f Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 17:45:04 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`mai?= =?UTF-8?q?n`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @lachieh. * https://github.com/TanStack/router/pull/5435#issuecomment-3391485129 The following files were modified: * `packages/react-router-devtools/src/TanStackRouterDevtools.tsx` --- .../src/TanStackRouterDevtools.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/react-router-devtools/src/TanStackRouterDevtools.tsx b/packages/react-router-devtools/src/TanStackRouterDevtools.tsx index fba93713ca..d5cd6dc432 100644 --- a/packages/react-router-devtools/src/TanStackRouterDevtools.tsx +++ b/packages/react-router-devtools/src/TanStackRouterDevtools.tsx @@ -5,7 +5,7 @@ import type { ButtonHTMLAttributes, HTMLAttributes } from 'react' import type { AnyRouter } from '@tanstack/react-router' import type React from 'react' -interface DevtoolsOptions { +interface TanStackRouterDevtoolsOptions { /** * Set this true if you want the dev tools to default to being open */ @@ -43,8 +43,16 @@ interface DevtoolsOptions { shadowDOMTarget?: ShadowRoot } -export function TanStackRouterDevtools( - props: DevtoolsOptions, +/** + * Mounts the TanStack Router Devtools UI and keeps its core instance synchronized with the provided router, router state, and options. + * + * The component creates and maintains a single Devtools core instance, updates it when `props` or router state change, mounts it into an internal div, and unmounts it on cleanup. + * + * @param props - Configuration and optional router instance for the devtools (see `TanStackRouterDevtoolsOptions`) + * @returns A React element containing the container div where the devtools UI is mounted, or `null` + */ +function TanStackRouterDevtools( + props: TanStackRouterDevtoolsOptions, ): React.ReactElement | null { const { initialIsOpen, @@ -124,3 +132,5 @@ export function TanStackRouterDevtools( ) } + +export { type TanStackRouterDevtoolsOptions, TanStackRouterDevtools } \ No newline at end of file From b928d864568f7015d29d58d4531a1be3b7345489 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 17:46:00 +0000 Subject: [PATCH 2/2] ci: apply automated fixes --- packages/react-router-devtools/src/TanStackRouterDevtools.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-router-devtools/src/TanStackRouterDevtools.tsx b/packages/react-router-devtools/src/TanStackRouterDevtools.tsx index d5cd6dc432..d8d4cbd2d4 100644 --- a/packages/react-router-devtools/src/TanStackRouterDevtools.tsx +++ b/packages/react-router-devtools/src/TanStackRouterDevtools.tsx @@ -133,4 +133,4 @@ function TanStackRouterDevtools( ) } -export { type TanStackRouterDevtoolsOptions, TanStackRouterDevtools } \ No newline at end of file +export { type TanStackRouterDevtoolsOptions, TanStackRouterDevtools }