Skip to content

test(react-query): replace 'import React' with 'import * as React' in 'usePrefetchQuery' and 'usePrefetchInfiniteQuery'#10363

Merged
sukvvon merged 1 commit intomainfrom
test/react-query-use-namespace-react-import
Mar 31, 2026
Merged

test(react-query): replace 'import React' with 'import * as React' in 'usePrefetchQuery' and 'usePrefetchInfiniteQuery'#10363
sukvvon merged 1 commit intomainfrom
test/react-query-use-namespace-react-import

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Mar 31, 2026

🎯 Changes

Replace import React from 'react' with import * as React from 'react' in usePrefetchQuery.test.tsx and usePrefetchInfiniteQuery.test.tsx to align with the rest of the test files and source code.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Tests
    • Updated test file imports for improved code consistency.

… 'usePrefetchQuery' and 'usePrefetchInfiniteQuery'
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: da06d8ff-2417-4ea0-95aa-ee5ba5469f32

📥 Commits

Reviewing files that changed from the base of the PR and between fd8c068 and d26a9fb.

📒 Files selected for processing (2)
  • packages/react-query/src/__tests__/usePrefetchInfiniteQuery.test.tsx
  • packages/react-query/src/__tests__/usePrefetchQuery.test.tsx

📝 Walkthrough

Walkthrough

Two test files updated their React import syntax from default imports to namespace imports (import * as React from 'react'). No functional changes, logic modifications, or test behavior alterations were introduced—only the import style was modified.

Changes

Cohort / File(s) Summary
React Import Style Updates
packages/react-query/src/__tests__/usePrefetchInfiniteQuery.test.tsx, packages/react-query/src/__tests__/usePrefetchQuery.test.tsx
Changed React import from default to namespace syntax (import * as React from 'react'). No functional or logic changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A namespace import, so clean and bright,
React comes in, held just right,
From default to asterisk we dance,
A simple style—no second glance!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: replacing default React imports with namespace imports in two test files.
Description check ✅ Passed The description includes all required sections from the template with appropriate content and correctly identifies this as a dev-only change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/react-query-use-namespace-react-import

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Mar 31, 2026

View your CI Pipeline Execution ↗ for commit d26a9fb

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 48s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-31 06:41:49 UTC

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 31, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10363

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10363

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10363

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@10363

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10363

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10363

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10363

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10363

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10363

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10363

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10363

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10363

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10363

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10363

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10363

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10363

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10363

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10363

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10363

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10363

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10363

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10363

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10363

commit: d26a9fb

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.98 KB (0%)
react minimal 9.01 KB (0%)

@sukvvon sukvvon merged commit 14a97b7 into main Mar 31, 2026
13 of 14 checks passed
@sukvvon sukvvon deleted the test/react-query-use-namespace-react-import branch March 31, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant