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

fix: Deprecate subscribeToQueryUpdates #425

Merged
merged 1 commit into from
Dec 8, 2023
Merged

Conversation

franky47
Copy link
Member

@franky47 franky47 commented Dec 8, 2023

It was broken in Next.js 14.0.3 due to shallow updates not calling the patched history methods, and fixed in Next.js 14.0.4.

However, since turning on the windowHistorySupport flag causes useSearchParams to be reactive to shallow URL query changes, there's no longer need for this method.

Marking it as deprecated now, and will be dropped along with other deprecations in v2.0.0 once WHS lands in GA.

Closes #422.

It was broken in Next.js 14.0.3 due to shallow updates
not calling the patched history methods, and fixed in
Next.js 14.0.4.

However, since turning on the `windowHistorySupport` flag
causes `useSearchParams` to be reactive to shallow URL query
changes, there's no longer need for this method.

Marking it as deprecated now, and will be dropped along with
other deprecations in v2.0.0 once WHS lands in GA.

Closes #422.
Copy link

vercel bot commented Dec 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-usequerystate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 8, 2023 0:05am

@franky47 franky47 changed the title fix: Deprecate subscribeToQueryUpdates fix: Deprecate subscribeToQueryUpdates Dec 8, 2023
@franky47 franky47 merged commit 4eeb665 into next Dec 8, 2023
24 checks passed
@franky47 franky47 deleted the ref/deprecate-query-watcher branch December 8, 2023 00:11
Copy link

github-actions bot commented Dec 8, 2023

🎉 This PR is included in version 1.13.1-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Dec 8, 2023

🎉 This PR is included in version 1.13.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@franky47 franky47 mentioned this pull request Dec 8, 2023
@franky47 franky47 mentioned this pull request Jan 15, 2024
10 tasks
franky47 added a commit that referenced this pull request Jan 15, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Jan 17, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Jan 17, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Feb 5, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Feb 5, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Feb 17, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Mar 21, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Mar 26, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Apr 21, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request May 13, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request May 19, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request May 19, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request May 19, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Jun 26, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Jun 26, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Jun 26, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Jul 20, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Jul 25, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Aug 30, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Sep 6, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Sep 24, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Sep 28, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
franky47 added a commit that referenced this pull request Oct 3, 2024
BREAKING CHANGE: the following deprecated APIs have been removed:
- `queryTypes` bag of parsers -> use individual `parseAsXYZ` parsers
  for better tree-shakeability.
- `subscribeToQueryUpdates` helper -> since Next.js 14.0.5,
  `useSearchParams` is reactive to shallow search params updates
  in the app router. See #425.
- Internal types and aliases
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.

subscribeToQueryUpdates is not reactive when using Next.js v14.0.3
1 participant