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
Setup is never called with Options API when using Nuxt #5
Comments
Hi Justin, Thanks for your answer!
You're right, it works if I disable autoimport. I then have to import import { FormKitSchema } from '@formkit/vue'
export default {
components: {
FormKitSchema,
},
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moved here from formkit/formkit#1214
Reproduction
https://github.com/sebj54/nuxt-debug-formkit
Describe the bug
I noticed a strange bug when using Nuxt with Options API. When the
FormKit
component is in the template (commented or not), thesetup
function is never called.I made a reproduction where you will find three components (each one is a page). These components should display a log in the console for each lifecycle event: setup, created (if using Options API) and mounted.
Components list:
ko.vue
: The component with the issue. You can try to uncomment theFormKit
component but thesetup
function won't be called anyway. It is only called when you remove the comment/component.ok.vue
: Same component than before but the difference is the component commentedok-composition.vue
: Same component thanko.vue
but Composition API is used here. There is also theFormKit
component commented but the setup log is shownLet me know if I can help in any way!
Environment
• OS: MacOS
• Browser : Firefox
• Version: 122
The text was updated successfully, but these errors were encountered: