When <keep-alive>, <component>, and defineAsyncComponent are used at the same time, there will be some problems #11334
Answered
by
s3xysteak
HaceraI
asked this question in
Help/Questions
-
When I use , , defineAsyncComponent at the same time, the Component's ref works fine when it is first activated, until it is activated again, the bound ref will get https://stackblitz.com/edit/vitejs-vite-eruauw?file=src%2FApp.vue default.webm |
Beta Was this translation helpful? Give feedback.
Answered by
s3xysteak
Jul 13, 2024
Replies: 1 comment
-
The problem is the current component instance become const handleSubmit = async () => {
console.log(formComponent.value) // = `null` in the end of the video above.
const data = await formComponent.value?.getFormData();
console.log('data', data);
formData.value = JSON.stringify(data);
}; Maybe you can post a dissusion or issue in the repo of |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
HaceraI
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem is the current component instance become
null
in the end.Maybe you can post a dissusion or issue in the repo of
vue-router
.