Subscribe on changes!

Invalid VNode type: Symbol(Text) (symbol)

avatar
Mar 27th 2022

Version

3.2.31

Reproduction link

stackblitz.com

image

Steps to reproduce

Open it up and you can see

What is expected?

The JSX slot takes effect when another VUE copy is used

What is actually happening?

In another VUE copy the Chinese text and fragment slots failed

avatar
Mar 27th 2022

duplicate of #5622 Because you have many instances of vue. see https://github.com/vuejs/core/issues/2064#issuecomment-797365133

avatar
Mar 27th 2022

You can't have two copies of Vue in the same app.

avatar
Mar 27th 2022

You can't have two copies of Vue in the same app.

why?

avatar
Mar 27th 2022

You can't have two copies of Vue in the same app.

All I need now is to mount multiple Vues.

avatar
Mar 27th 2022

You can't. We use symbols. Symbols are singletons. Each copy of Vue will have different Symbols.

avatar
Mar 27th 2022

You can't. We use symbols. Symbols are singletons. Each copy of Vue will have different Symbols.

I'm doing a remote component pull feature right now, but it needs to be independent of the base application version, so I do need to create multiple Vues to do this. In terms of presentation, JSX syntax does not render text and fragment nodes correctly, but other nodes are fine? I think the text node should be created in the Vue after the slot is inserted

avatar
Mar 27th 2022

It's not just about these two Symbols.

Reactivity Tracking and effects scheduling is also relying on singletons. Even if you get these components to render, they will likely not update as they come with their own scheduler that does t know about effects & reactive data from the surrounding app, or have other bugs.

avatar
Mar 27th 2022

It's not just about these two Symbols.

Reactivity Tracking and effects scheduling is also relying on singletons. Even if you get these components to render, they will likely not update as they come with their own scheduler that does t know about effects & reactive data from the surrounding app, or have other bugs.

I make sure that my data effects is dependent on the same Vue instance.

such as "app3" https://stackblitz.com/edit/vitejs-vite-cvfhmn?file=src/App.vue

avatar
Mar 27th 2022

Oh. I'm misunderstanding the problem. It's essentially just about the JSX transform injecting the wrong h, or somethingike that?

avatar
Mar 27th 2022

Can you try manually importing h from the correct package?

avatar
Mar 28th 2022

Can you try manually importing h from the correct package?

import h is ok.

such as "app6" https://stackblitz.com/edit/vitejs-vite-wjqutb?file=src/App.vue

avatar
Mar 28th 2022
image