Skip to content

chore(hooks): remove unused 'useMutation' hook - #1046

Merged
sukvvon merged 4 commits into
mainfrom
chore/remove-unused-usemutation-hook
Aug 2, 2026
Merged

chore(hooks): remove unused 'useMutation' hook#1046
sukvvon merged 4 commits into
mainfrom
chore/remove-unused-usemutation-hook

Conversation

@sukvvon

@sukvvon sukvvon commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove src/hooks/useMutation.ts (useBaseMutation/useMutation), which had zero importers — every call site in the codebase uses useMutation from @tanstack/react-query instead.

Test plan

  • pnpm test (tsc, lint, unit tests) passes

Summary by CodeRabbit

  • Refactor
    • Removed legacy mutation-handling functionality, including form submission state, callback processing, error handling, redirects, and route refresh behavior.
    • Integrations relying on the previous mutation APIs may require updates.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 92c52c7 Commit Preview URL

Branch Preview URL
Aug 02 2026, 06:40 AM

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c2f90ab-f307-4a6e-97ab-db13871bcc15

📥 Commits

Reviewing files that changed from the base of the PR and between 750479b and 92c52c7.

📒 Files selected for processing (1)
  • src/hooks/useMutation.ts
💤 Files with no reviewable changes (1)
  • src/hooks/useMutation.ts

📝 Walkthrough

Walkthrough

The pull request deletes src/hooks/useMutation.ts. This removes useBaseMutation and useMutation, including mutation state, callbacks, form submission, error handling, redirects, and router invalidation.

Changes

Cohort / File(s) Summary
Mutation hook removal
src/hooks/useMutation.ts
Deletes the exported mutation hooks and their related mutation handling logic.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the removal of the unused useMutation hook, which is the main change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 chore/remove-unused-usemutation-hook

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@sukvvon sukvvon self-assigned this Jul 17, 2026
@sukvvon sukvvon changed the title chore(hooks/useMutation): remove unused hook chore(hooks): remove unused 'useMutation' hook Jul 17, 2026
@sukvvon
sukvvon force-pushed the chore/remove-unused-usemutation-hook branch from b993fb7 to 92fbe06 Compare July 17, 2026 04:10
@sukvvon
sukvvon requested a review from a team July 23, 2026 10:33
@sukvvon
sukvvon merged commit 9b4d4a1 into main Aug 2, 2026
7 checks passed
@sukvvon
sukvvon deleted the chore/remove-unused-usemutation-hook branch August 2, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants