Movatterモバイル変換


[0]ホーム

URL:


Wayback Machine
1 capture
27 Dec 2024
NovDECJan
27
202320242025
success
fail
COLLECTED BY
TIMESTAMPS
loading
The Wayback Machine - http://web.archive.org/web/20241227131859/https://github.com/nuxt/nuxt/pull/20093
Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/nuxtPublic
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

fix(nuxt): add key to.client component placeholders#20093

Merged
danielroe merged 13 commits intonuxt:mainfromhuang-julien:fix/scopedIdClient
Apr 7, 2023

Conversation

huang-julien
Copy link
Member

🔗 Linked issue

resolve#20061

❓ Type of change

Hi 👋 this PR fix.client components root nodes missing scopeId by simply adding akey

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • �?️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codesandbox
Copy link

CodeSandbox logoCodeSandbox logo�? Open in CodeSandboxWeb Editor |VS Code |VS Code Insiders

@huang-julienhuang-julien marked this pull request as ready for reviewApril 4, 2023 22:39
@danielroedanielroe requested a review fromantfuApril 5, 2023 09:55
@antfu
Copy link
Member

@huang-julien can you explain more about why adding a boolean key can help the scopeId?

@huang-julien
Copy link
MemberAuthor

it is just to completly reload the render.
My guess was that since the placeholder is adiv and the components root node is also adiv, vue does not set thev-data scope Id. We don't have the issue if the.client component renders aFragment or any other tags.

@antfu
Copy link
Member

Maybe we could assign a random(or fixed) key to the placeholder but not the rendered component?
So placeholder with key should already not be treat the same as the rendered component without key. There shouldn't be much difference in practice but I am a bit worried overriding thekey user might define, or causing the component to mount multiple times etc.

huang-julien reacted with thumbs up emoji

@huang-julien
Copy link
MemberAuthor

ah yes it should be obvious 😅 ....

@danielroedanielroe added the 3.x labelApr 6, 2023
@danielroedanielroe changed the titlefix(nuxt): force .client components root node to inherit scopeIdfix(nuxt): add key to.client component placeholdersApr 7, 2023
@danielroedanielroe merged commitb068f79 intonuxt:mainApr 7, 2023
@danielroedanielroe mentioned this pull requestApr 10, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@danielroedanielroedanielroe approved these changes

@antfuantfuAwaiting requested review from antfu

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

.client.vue scoped styles are missing on ssr
3 participants
@huang-julien@antfu@danielroe

[8]ページ先頭

©2009-2025 Movatter.jp