Skip to content

Commit

Permalink
fix: update return types to React.JSX.Element
Browse files Browse the repository at this point in the history
  • Loading branch information
gwansikk committed Dec 25, 2024
1 parent b43d443 commit 6fc23c3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/react-query-devtools/src/Explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ type Entry = {
}

type RendererProps = {
handleEntry: (entry: Entry) => JSX.Element
handleEntry: (entry: Entry) => React.JSX.Element
label?: string
value: unknown
subEntries: Entry[]
Expand Down Expand Up @@ -220,7 +220,7 @@ export function chunkArray<T>(array: T[], size: number): T[][] {
return result
}

type Renderer = (props: RendererProps) => JSX.Element
type Renderer = (props: RendererProps) => React.JSX.Element

export const DefaultRenderer: Renderer = ({
handleEntry,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ describe('ReactQueryDevtools', () => {
paddingRight: '20%',
}

function Parent({ children }: { children: React.ReactElement }) {
function Parent({ children }: { children: React.ReactNode }) {
return (
<div data-testid={parentElementTestid} style={parentPaddings}>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const PersistQueryClientProvider = ({
persistOptions,
onSuccess,
...props
}: PersistQueryClientProviderProps): JSX.Element => {
}: PersistQueryClientProviderProps): React.JSX.Element => {
const [isRestoring, setIsRestoring] = React.useState(true)
const refs = React.useRef({ persistOptions, onSuccess })
const didRestore = React.useRef(false)
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/src/QueryClientProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const QueryClientProvider = ({
children,
context,
contextSharing = false,
}: QueryClientProviderProps) => {
}: QueryClientProviderProps): React.JSX.Element => {
React.useEffect(() => {
client.mount()
return () => {
Expand Down

0 comments on commit 6fc23c3

Please sign in to comment.