Skip to content

When <keep-alive>, <component>, and defineAsyncComponent are used at the same time, there will be some problems #11334

Discussion options

You must be logged in to vote

The problem is the current component instance become null in the end.

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 vue-router.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by HaceraI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants