-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix vue resetting state when using view transition persistence (#11946)
* Fix vue resetting state when using view transition persistence * Avoid calling internal apis when forcing vue component update
- Loading branch information
1 parent
a2f8c5d
commit b75bfc8
Showing
6 changed files
with
87 additions
and
18 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 @@ | ||
--- | ||
'@astrojs/vue': patch | ||
--- | ||
|
||
Fix vue islands keeping their state when using view transition persistence |
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
11 changes: 11 additions & 0 deletions
11
packages/astro/e2e/fixtures/view-transitions/src/pages/island-vue-one.astro
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,11 @@ | ||
--- | ||
import Layout from '../components/Layout.astro'; | ||
import Counter from '../components/VueCounter.vue'; | ||
export const prerender = false; | ||
--- | ||
<Layout> | ||
<p id="island-one">Page 1</p> | ||
<a id="click-two" href="/island-vue-two">go to 2</a> | ||
<Counter prefix="AA" client:load transition:persist transition:name="counter" /> | ||
</Layout> |
11 changes: 11 additions & 0 deletions
11
packages/astro/e2e/fixtures/view-transitions/src/pages/island-vue-two.astro
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,11 @@ | ||
--- | ||
import Layout from '../components/Layout.astro'; | ||
import Counter from '../components/VueCounter.vue'; | ||
export const prerender = false; | ||
--- | ||
<Layout> | ||
<p id="island-two">Page 2</p> | ||
<a id="click-two" href="/island-vue-one">go to 1</a> | ||
<Counter prefix="BB" client:load transition:persist transition:name="counter" /> | ||
</Layout> |
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