multipe createApp will change inject value
Version
3.1.4
Reproduction link
Steps to reproduce
when use createApp in setup, inject will get undefined.
What is expected?
get correct value
What is actually happening?
can not get correct value
maybe this is expected. but we have some Scenes use api component, like window.alert. Now, ant-design-vue, element-plus all use createApp to create new instance. Do you have some recommend, If we can not use createApp in setup.
This is expected, it's even used at https://github.com/vueuse/vueuse/blob/main/packages/core/createGlobalState/index.ts) until effectScope()
is released.
You need to move any provide/inject inside setup()
before any createApp
call. You shouldn't call createApp()
inside of a Vue component either
BTW your reproduction is very far from minimal and it's difficult to navigate
This is not friendly for user, and we have no way to judge whether there is a createApp before inject