Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

主应用不同组件上同时发送多次setData,要么会被覆盖掉,要么旧数据还在,是得子应用监听数据是不清楚哪个是最新的数据,哪些是旧的 #1389

Open
xian107 opened this issue Sep 26, 2024 · 1 comment
Assignees

Comments

@xian107
Copy link

xian107 commented Sep 26, 2024

问题描述

问题的具体描述

复现步骤

  1. 同时在page1和page2,异步请求设置setData设置type属性,子应用只能接收到一个type
    image
    page1 microApp.setData("sub-app", { type: "auth", payload: "授权码", }); page2 microApp.setData("sub-app",{ type: "account", payload: "登陆账号详情", };

  2. 改成同时在page1和page3,异步请求设置setData设置不同的key,会导致之前设置的旧数据还在
    image

复现仓库

https://github.com/xian107/microApp_data

环境信息

-micro-app版本:^1.0.0-rc.10
-主应用前端框架&版本: react ^18.3.1
-子应用前端框架&版本:react ^18.3.1
-构建工具&版本:webpack

@timhub66 timhub66 self-assigned this Sep 27, 2024
@undeadfrost
Copy link

数据传递问题也同样遇到了,这项目的issues不是直接被关闭就是没人回复。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants