-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Switch - TypeError: Cannot read properties of undefined (reading 'switchRef')
#1827
Comments
@RobinMalfait I did a bit of poking around:
The code sandbox, for me, never loads. It's always stuck on "installing packages". So, I created a SSR-enabled Vue SFC explorer reproduction if that helps. |
This issue comes with the |
Found a working solution for me #982 (comment) |
Hey, appreciate you providing a reproduction for this! We looked into this further and it appears to be not a Headless UI issue. Looks like the bundler build of the server render doesn't have this problem but the browser build does. Likely for the same reason that Nuxt has an issue — like @sprattek pointed out. The fix here would be to add Headless UI to your Ultimately this isn't a Headless UI issue but either a Vue internals problem or a Nuxt problem or both. |
also works for me, thanks |
Libraries versions
@headlessui/vue
- 1.7.0nuxt
- 3.0.0-rc.9Reproduction/example: https://codesandbox.io/s/gracious-williamson-tjkrci?file=/pages/index.vue
Vue 3/Nuxt 3
Code:
Error:
The text was updated successfully, but these errors were encountered: