From 9db298363b0df84225e03e54bbbe950814c55495 Mon Sep 17 00:00:00 2001 From: Juhyeok Kang Date: Wed, 20 Nov 2024 11:25:00 +0900 Subject: [PATCH] fix(react-query, jotai, react): fix typo in jsdoc (#1364) # Overview ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md) 2. I added documents and tests. --------- Co-authored-by: Jonghyeon Ko --- .changeset/twenty-rockets-knock.md | 8 ++++++++ .changeset/wild-days-retire.md | 8 ++++++++ packages/jotai/src/Atom.tsx | 4 ++-- packages/jotai/src/AtomValue.tsx | 4 ++-- packages/jotai/src/SetAtom.tsx | 4 ++-- packages/react-query-4/src/PrefetchInfiniteQuery.tsx | 2 +- packages/react-query-4/src/usePrefetchInfiniteQuery.ts | 2 +- packages/react-query-4/src/usePrefetchQuery.ts | 2 +- packages/react-query-4/src/useSuspenseInfiniteQuery.ts | 2 +- packages/react-query-4/src/useSuspenseQueries.ts | 2 +- packages/react-query-4/src/useSuspenseQuery.ts | 2 +- packages/react-query-5/src/QueryErrorBoundary.tsx | 2 +- packages/react-query-5/src/SuspenseQuery.tsx | 8 ++++---- packages/react/src/Suspense.tsx | 2 +- 14 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 .changeset/twenty-rockets-knock.md create mode 100644 .changeset/wild-days-retire.md diff --git a/.changeset/twenty-rockets-knock.md b/.changeset/twenty-rockets-knock.md new file mode 100644 index 000000000..b9c8f7957 --- /dev/null +++ b/.changeset/twenty-rockets-knock.md @@ -0,0 +1,8 @@ +--- +"@suspensive/jotai": patch +"@suspensive/react-query-4": patch +"@suspensive/react-query-5": patch +"@suspensive/react": patch +--- + +fix(*): fix typo in jsdoc diff --git a/.changeset/wild-days-retire.md b/.changeset/wild-days-retire.md new file mode 100644 index 000000000..2e363ff9b --- /dev/null +++ b/.changeset/wild-days-retire.md @@ -0,0 +1,8 @@ +--- +'@suspensive/react-query-4': patch +'@suspensive/react-query-5': patch +'@suspensive/jotai': patch +'@suspensive/react': patch +--- + +fix(react-query, jotai, react): fix typo in jsdoc diff --git a/packages/jotai/src/Atom.tsx b/packages/jotai/src/Atom.tsx index 926721276..e45f1496a 100644 --- a/packages/jotai/src/Atom.tsx +++ b/packages/jotai/src/Atom.tsx @@ -20,10 +20,10 @@ type UseAtomProps[0]> = { } /** - * This hook is wrapping `useAtom` hook from jotai. + * This component is wrapping `useAtom` of jotai. * * The Atom component provides an interface similar to Jotai's `useAtom` hook as props, allowing declarative usage. - * @see {@link https://suspensive.org/docs/jotai/Atom} + * @see {@link https://suspensive.org/docs/jotai/Atom Suspensive Docs} * @example * ```jsx * import { Atom } from '@suspensive/jotai' diff --git a/packages/jotai/src/AtomValue.tsx b/packages/jotai/src/AtomValue.tsx index f3e267f2f..54192b4ae 100644 --- a/packages/jotai/src/AtomValue.tsx +++ b/packages/jotai/src/AtomValue.tsx @@ -8,10 +8,10 @@ type UseAtomValueProps[0]> = { } /** - * This hook is wrapping `useAtomValue` hook from jotai. + * This component is wrapping `useAtomValue` of jotai. * * The AtomValue component provides an interface similar to Jotai's `useAtomValue` hook as props, allowing declarative usage. - * @see {@link https://suspensive.org/docs/jotai/AtomValue} + * @see {@link https://suspensive.org/docs/jotai/AtomValue Suspensive Docs} * @example * ```jsx * import { AtomValue } from '@suspensive/jotai' diff --git a/packages/jotai/src/SetAtom.tsx b/packages/jotai/src/SetAtom.tsx index 2594cde6b..a241a607a 100644 --- a/packages/jotai/src/SetAtom.tsx +++ b/packages/jotai/src/SetAtom.tsx @@ -8,10 +8,10 @@ type UseSetAtomProps = { } /** - * This Component is wrapping `useSetAtom` of jotai + * This component is wrapping `useSetAtom` of jotai. * * The SetAtom component provides an interface similar to Jotai's `useSetAtom` hook as props, allowing declarative usage. - * @see {@link https://suspensive.org/docs/jotai/SetAtom} + * @see {@link https://suspensive.org/docs/jotai/SetAtom Suspensive Docs} * @example * ```jsx * import { SetAtom } from '@suspensive/jotai' diff --git a/packages/react-query-4/src/PrefetchInfiniteQuery.tsx b/packages/react-query-4/src/PrefetchInfiniteQuery.tsx index 0038dbe30..2e6bd2582 100644 --- a/packages/react-query-4/src/PrefetchInfiniteQuery.tsx +++ b/packages/react-query-4/src/PrefetchInfiniteQuery.tsx @@ -2,7 +2,7 @@ import { type FetchInfiniteQueryOptions, type QueryKey } from '@tanstack/react-q import { usePrefetchInfiniteQuery } from './usePrefetchInfiniteQuery' /** - * A component that allows you to use usePrefetchInfiniteQuery in JSX, avoiding the limitations of React hooks. + * A component that allows you to use `usePrefetchInfiniteQuery` in JSX, avoiding the limitations of React hooks. * @see {@link https://suspensive.org/en/docs/react-query/PrefetchInfiniteQuery Suspensive Docs} * @example * ```tsx diff --git a/packages/react-query-4/src/usePrefetchInfiniteQuery.ts b/packages/react-query-4/src/usePrefetchInfiniteQuery.ts index b081f73aa..377f472b0 100644 --- a/packages/react-query-4/src/usePrefetchInfiniteQuery.ts +++ b/packages/react-query-4/src/usePrefetchInfiniteQuery.ts @@ -1,7 +1,7 @@ import { type FetchInfiniteQueryOptions, type QueryKey, useQueryClient } from '@tanstack/react-query' /** - * The usePrefetchInfiniteQuery does not return anything, it should be used just to fire a prefetch during render, before a suspense boundary that wraps a component that uses useSuspenseInfiniteQuery. + * The `usePrefetchInfiniteQuery` does not return anything, it should be used just to fire a prefetch during render, before a suspense boundary that wraps a component that uses `useSuspenseInfiniteQuery`. * @see {@link https://suspensive.org/en/docs/react-query/usePrefetchInfiniteQuery Suspensive Docs} */ export function usePrefetchInfiniteQuery< diff --git a/packages/react-query-4/src/usePrefetchQuery.ts b/packages/react-query-4/src/usePrefetchQuery.ts index 03e87d69f..a3d156140 100644 --- a/packages/react-query-4/src/usePrefetchQuery.ts +++ b/packages/react-query-4/src/usePrefetchQuery.ts @@ -1,7 +1,7 @@ import { type FetchQueryOptions, type QueryKey, useQueryClient } from '@tanstack/react-query' /** - * The usePrefetchQuery does not return anything, it should be used just to fire a prefetch during render, before a suspense boundary that wraps a component that uses useSuspenseQuery. + * The `usePrefetchQuery` does not return anything, it should be used just to fire a prefetch during render, before a suspense boundary that wraps a component that uses `useSuspenseQuery`. * @see {@link https://suspensive.org/en/docs/react-query/usePrefetchQuery Suspensive Docs} */ export function usePrefetchQuery< diff --git a/packages/react-query-4/src/useSuspenseInfiniteQuery.ts b/packages/react-query-4/src/useSuspenseInfiniteQuery.ts index 56e22988d..3843f7e56 100644 --- a/packages/react-query-4/src/useSuspenseInfiniteQuery.ts +++ b/packages/react-query-4/src/useSuspenseInfiniteQuery.ts @@ -27,7 +27,7 @@ export type UseSuspenseInfiniteQueryOptions< > /** - * This hook is wrapping useInfiniteQuery of `@tanstack/react-query` v4 with default suspense option. + * This hook is wrapping `useInfiniteQuery` of `@tanstack/react-query` v4 with default suspense option. * @see {@link https://suspensive.org/en/docs/react-query/useSuspenseInfiniteQuery Suspensive Docs} */ export function useSuspenseInfiniteQuery< diff --git a/packages/react-query-4/src/useSuspenseQueries.ts b/packages/react-query-4/src/useSuspenseQueries.ts index b506fce3c..660a2f2e5 100644 --- a/packages/react-query-4/src/useSuspenseQueries.ts +++ b/packages/react-query-4/src/useSuspenseQueries.ts @@ -110,7 +110,7 @@ export type SuspenseQueriesResults< Array /** - * This hook is wrapping useQueries of `@tanstack/react-query` v4 with default suspense option. + * This hook is wrapping `useQueries` of `@tanstack/react-query` v4 with default suspense option. * @see {@link https://suspensive.org/en/docs/react-query/useSuspenseQueries Suspensive Docs} */ export function useSuspenseQueries({ diff --git a/packages/react-query-4/src/useSuspenseQuery.ts b/packages/react-query-4/src/useSuspenseQuery.ts index e66de49aa..e094b4d5e 100644 --- a/packages/react-query-4/src/useSuspenseQuery.ts +++ b/packages/react-query-4/src/useSuspenseQuery.ts @@ -18,7 +18,7 @@ export type UseSuspenseQueryOptions< > /** - * This hook is wrapping useQuery of `@tanstack/react-query` v4 with default suspense option. + * This hook is wrapping `useQuery` of `@tanstack/react-query` v4 with default suspense option. * @see {@link https://suspensive.org/en/docs/react-query/useSuspenseQuery Suspensive Docs} */ export function useSuspenseQuery< diff --git a/packages/react-query-5/src/QueryErrorBoundary.tsx b/packages/react-query-5/src/QueryErrorBoundary.tsx index 5f27ea568..3e0e2be23 100644 --- a/packages/react-query-5/src/QueryErrorBoundary.tsx +++ b/packages/react-query-5/src/QueryErrorBoundary.tsx @@ -3,7 +3,7 @@ import { useQueryErrorResetBoundary } from '@tanstack/react-query' import { type ComponentPropsWithoutRef, type ComponentRef, forwardRef } from 'react' /** - * This component wrapping QueryErrorResetBoundary of `@tanstack/react-query` with `@suspensive/react`'s ErrorBoundary. So you must install `@suspensive/react` first, then use it. with this component, You don't have to make unnecessary repetitive implementation to combine ErrorBoundary with QueryErrorResetBoundary + * This component is wrapping QueryErrorResetBoundary of `@tanstack/react-query` with `@suspensive/react`'s ErrorBoundary. So you must install `@suspensive/react` first, then use it. with this component, You don't have to make unnecessary repetitive implementation to combine ErrorBoundary with QueryErrorResetBoundary * @deprecated this interface will be removed in the next major version. Please make this component yourself by combining ErrorBoundary of `@suspensive/react` and useQueryErrorResetBoundary of `@tanstack/react-query` * @example * ```tsx diff --git a/packages/react-query-5/src/SuspenseQuery.tsx b/packages/react-query-5/src/SuspenseQuery.tsx index ca7c4e8b6..3a08b8117 100644 --- a/packages/react-query-5/src/SuspenseQuery.tsx +++ b/packages/react-query-5/src/SuspenseQuery.tsx @@ -15,12 +15,12 @@ import type { ReactNode } from 'react' * ```tsx * import { SuspenseQuery } from '@suspensive/react-query' * - * // You can use QueryOptions as props. + * // You can use queryOptions as props. * - * {({ data, isLoading }) => { + * {({ data }) => { * return <> - * } - * + * }} + * */ export const SuspenseQuery = < TQueryFnData = unknown, diff --git a/packages/react/src/Suspense.tsx b/packages/react/src/Suspense.tsx index ce07b2de7..c56d4814a 100644 --- a/packages/react/src/Suspense.tsx +++ b/packages/react/src/Suspense.tsx @@ -23,7 +23,7 @@ export interface SuspenseProps /** * This component is just wrapping React's Suspense. to use Suspense easily in Server-side rendering environment like Next.js - * @see {@link https://suspensive.org/docs/react/Suspense} + * @see {@link https://suspensive.org/docs/react/Suspense Suspensive Docs} */ export const Suspense = ({ clientOnly, children, fallback }: SuspenseProps) => { const defaultProps = useContext(SuspenseDefaultPropsContext)