-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not scroll to top if the URL pathname has not changed (#813)
* Do not scroll to top if the URL pathname has not changed * Refactor: initialize currentPath * Fix mobile navigation resetting scroll * Revert "Refactor: initialize currentPath" This reverts commit c40d022. * Remove router logic from server bundle and split client bundle in smaller chunks (#832) * Change RouterClient to be a shared component to reduce server bundle size * Change ServerStateProvider to be a shared component and avoid extra bundling in client build * Update changeset
- Loading branch information
Showing
11 changed files
with
31 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@shopify/hydrogen': patch | ||
--- | ||
|
||
Do not scroll to top if the URL pathname has not changed. |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@shopify/hydrogen': patch | ||
--- | ||
|
||
Remove Router client-only logic from server bundle and avoid extra waterfall requests during Hydration. | ||
Extract part of the client bundle into separate modules that can be loaded in parallel. |
14 changes: 7 additions & 7 deletions
14
examples/template-hydrogen-default/src/components/MobileNavigation.client.jsx
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
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
File renamed without changes.
10 changes: 2 additions & 8 deletions
10
packages/hydrogen/src/foundation/ServerStateProvider/index.ts
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,8 +1,2 @@ | ||
export { | ||
ServerStateProvider, | ||
ServerStateContext, | ||
} from './ServerStateProvider.client'; | ||
export type { | ||
ServerState, | ||
ServerStateContextValue, | ||
} from './ServerStateProvider.client'; | ||
export {ServerStateProvider, ServerStateContext} from './ServerStateProvider'; | ||
export type {ServerState, ServerStateContextValue} from './ServerStateProvider'; |
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