generated from chiffre-io/template-library
-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: App router now uses history API
Not listed yet as a change that requires a major bump, but it lays the foundation for a unified API with the pages router implementation. Such a change will require Next 13.4+ with the stable app router. At this time we've got: - An internal state for fast updates - A deferred queue for updating the URL query string, which allows batching and with a Promise-based API - A sync system between hooks and with external navigation, from <Link> and imperative calls to the Next.js router - No more network calls when updating queries (shallow by default) - No more scroll to top when updating queries (this is kind of a breaking change). This is done by bypassing the Next.js router and patching the Web History API calls to gain reactivity on external query updates, using an event emitter to keep hooks of the same key in sync across the app, and an update queue to allow batching and throttling.
- Loading branch information
Showing
14 changed files
with
550 additions
and
301 deletions.
There are no files selected for viewing
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 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
Oops, something went wrong.