Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(react-query): add support for react19 in v4 #8441

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: update return types to React.JSX.Element
  • Loading branch information
gwansikk committed Dec 25, 2024
commit 6fc23c37aeefb1c011ce5d2ea552c0330f353f90
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
Loading