Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useAttrs on server side returns empty object #13611

Closed
weeuwee opened this issue Apr 4, 2022 · 2 comments
Closed

useAttrs on server side returns empty object #13611

weeuwee opened this issue Apr 4, 2022 · 2 comments

Comments

@weeuwee
Copy link

weeuwee commented Apr 4, 2022

Environment


  • Operating System: Windows_NT
  • Node Version: v14.18.2
  • Nuxt Version: 3.0.0-27480376.fdd38f9
  • Package Manager: pnpm@6.32.4
  • Builder: vite
  • User Config: meta, buildModules, publicRuntimeConfig, privateRuntimeConfig, typescript, vueuse, unocss, css, build
  • Runtime Modules: -
  • Build Modules: @vueuse/nuxt@8.2.4, @unocss/nuxt@0.30.11, @pinia/nuxt@0.1.8

Reproduction

https://stackblitz.com/edit/github-eryerg?file=app.vue

Describe the bug

If a @click="function" is attached to a custom component, useAttrs in the component should be able to pick up onClick. On server side, it returns an empty object, but it returns something on the client side.

Additional context

No response

Logs

No response

@danielroe
Copy link
Member

This is Vue 3 SSR behaviour, not Nuxt in particular.

Issue raised upstream vuejs/core#5664.

@danielroe
Copy link
Member

This is resolved in the latest version of Vue.

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants