generated from chiffre-io/template-library
-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
10 changed files
with
30 additions
and
473 deletions.
There are no files selected for viewing
36 changes: 0 additions & 36 deletions
36
packages/docs/src/app/playground/_demos/subscribeToQueryUpdates/page.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
'use client' | ||
|
||
export type { HistoryOptions, Options } from './defs' | ||
export * from './deprecated' | ||
export * from './parsers' | ||
export { createSerializer } from './serializer' | ||
export { subscribeToQueryUpdates } from './sync' | ||
export type { QueryUpdateNotificationArgs, QueryUpdateSource } from './sync' | ||
export * from './useQueryState' | ||
export * from './useQueryStates' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,21 +27,6 @@ declare global { | |
} | ||
} | ||
|
||
/** | ||
* @deprecated Since Next.js introduced shallow routing in 14.0.3, this | ||
* method is no longer needed as you can use `useSearchParams`, which will | ||
* react to changes in the URL when the `windowHistorySupport` experimental flag | ||
* is set. | ||
* This method will be removed in `[email protected]`, when Next.js | ||
* decides to land the `windowHistorySupport` flag in GA. | ||
*/ | ||
export function subscribeToQueryUpdates( | ||
callback: (args: QueryUpdateNotificationArgs) => void | ||
) { | ||
emitter.on(NOTIFY_EVENT_KEY, callback) | ||
return () => emitter.off(NOTIFY_EVENT_KEY, callback) | ||
} | ||
|
||
if (typeof history === 'object') { | ||
patchHistory() | ||
} | ||
|
Oops, something went wrong.