-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nuxt): fix skipHydrate payload plugin and add test
- Loading branch information
Showing
4 changed files
with
15 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
<script lang="ts" setup> | ||
const store = useWithSkipHydrateStore() | ||
const skipHydrateState = computed(() => { | ||
return store.skipped?.text === 'I should not be serialized or hydrated' | ||
? 'skipHydrate-wrapped state is correct' | ||
: 'skipHydrate-wrapped state is incorrect' | ||
}) | ||
</script> | ||
|
||
<template> | ||
<h2>skipHydrate() test</h2> | ||
<pre>{{ store.skipped }}</pre> | ||
<pre>{{ skipHydrateState }}</pre> | ||
</template> |
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,3 @@ | ||
{ | ||
"extends": "./.nuxt/tsconfig.json" | ||
} |
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