Skip to content

Commit

Permalink
fix(react-query, jotai, react): fix typo in jsdoc (#1364)
Browse files Browse the repository at this point in the history
# Overview

<!--
    A clear and concise description of what this pr is about.
 -->


## 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 <[email protected]>
  • Loading branch information
kangju2000 and manudeli authored Nov 20, 2024
1 parent 2d4e68f commit 9db2983
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 18 deletions.
8 changes: 8 additions & 0 deletions .changeset/twenty-rockets-knock.md
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions .changeset/wild-days-retire.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions packages/jotai/src/Atom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ type UseAtomProps<TAtom extends Parameters<typeof useAtom>[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'
Expand Down
4 changes: 2 additions & 2 deletions packages/jotai/src/AtomValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ type UseAtomValueProps<TAtom extends Parameters<typeof useAtomValue>[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'
Expand Down
4 changes: 2 additions & 2 deletions packages/jotai/src/SetAtom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ type UseSetAtomProps<TAtom> = {
}

/**
* 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'
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query-4/src/PrefetchInfiniteQuery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query-4/src/usePrefetchInfiniteQuery.ts
Original file line number Diff line number Diff line change
@@ -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<
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query-4/src/usePrefetchQuery.ts
Original file line number Diff line number Diff line change
@@ -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<
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query-4/src/useSuspenseInfiniteQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query-4/src/useSuspenseQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export type SuspenseQueriesResults<
Array<UseSuspenseQueryResult>

/**
* 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<T extends any[]>({
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query-4/src/useSuspenseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query-5/src/QueryErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions packages/react-query-5/src/SuspenseQuery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <SuspenseQuery {...queryOptions()}>
* {({ data, isLoading }) => {
* {({ data }) => {
* return <></>
* }
* </SuspenseQuery/>
* }}
* </SuspenseQuery>
*/
export const SuspenseQuery = <
TQueryFnData = unknown,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Suspense.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9db2983

Please sign in to comment.