This repository was archived by the owner on Apr 6, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(nuxt): remove wrapper from client only components #6165
Merged
Merged
Changes from 18 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
c7dea42
fix(nuxt): make client only redefine the component instead of wrappinβ¦
huang-julien 25580cb
fix(nuxt): use ctx instead of state to avoid vue Error
huang-julien f77d169
refactor(nuxt): remove unused import
huang-julien e5b668f
fix(nuxt): wrap the render with h()
huang-julien 7bb336c
Merge remote-tracking branch 'origin/main' into fix/create-client-onlβ¦
danielroe a4b7150
refactor: use collision-resistant name and pass all attrs
danielroe 9975293
test: add client-only component to fixture using ref + expose
danielroe d3fbb3c
fix: register callback before calling setup
danielroe 0f87fd3
fix: refactor wholly into setup function
danielroe fb8798c
Merge branch 'main' into fix/create-client-only-wrapper
danielroe c963ba8
fix(nuxt): pass setup result to component render
huang-julien 1a904b1
Update packages/nuxt/src/app/components/client-only.mjs
danielroe b08a875
fix(nuxt): conditionnal render on build-dev for client-only.mjs
8df797a
fix(nuxt): use render() and return setup result only in dev
huang-julien fea482e
fix(nuxt): keep original component structure for createClientOnly()
huang-julien 294c077
fix(nuxt): fix inheritAttrs and handle template in createClientOnly
0431072
fix(nuxt): fix attrs inheritance
cacf259
Merge remote-tracking branch 'origin/main' into fix/create-client-onlβ¦
danielroe 860c716
refactor: pass other render args as is without naming
pi0 0bf46dd
use ctx to read prop
pi0 986bc42
refactor: rename state to __mounted__
pi0 3ff8bbb
Merge branch 'main' into fix/create-client-only-wrapper
pi0 4d400c7
revert state name
pi0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,17 @@ | ||
<script setup lang="ts"> | ||
function exposedFunc () { | ||
console.log('ok') | ||
} | ||
|
||
defineExpose({ exposedFunc }) | ||
|
||
await new Promise(resolve => setTimeout(resolve, 300)) | ||
|
||
onMounted(() => { console.log('mounted') }) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
client-only component | ||
</div> | ||
</template> |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.