Open likang329 opened 4 months ago
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Title: How does the host side use the data in the state in pinia on the remote side?
只要 Vue 是同一个 vue , pinia 就能共享,跟模块联邦没关系,是你的 vue 不是同一个,没有 share
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
As long as Vue is the same vue, Pinia can share it. It has nothing to do with module federation. It's just that your vue is not the same one and there is no share.
只要 Vue 是同一个 vue , pinia 就能共享,跟模块联邦没关系,是你的 vue 不是同一个,没有 share
我这边是host,引入了remote,想让remote的页面在host里边跑的时候,pinia数据展示的是host的,但是没有效果
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
As long as Vue is the same vue, Pinia can share it. It has nothing to do with module federation. Your vue is not the same one, so there is no share.
My side is the host, and remote has been introduced. When I want the remote page to run in the host, the pinia data shows the host, but it has no effect.
我在remote暴露了整个store,想在host端使用,在host端使用remote端中actions写的方法没有问题,但是获取state中的变量值为空,请问我该怎么把remote端的store中的变量都共享呢?
这是remote端的页面:
这是host端的页面:
这是remote端的暴露组件:
这是host端的引入使用组件: