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

fix:mount node null #727

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

huxfy
Copy link

@huxfy huxfy commented Mar 18, 2024

修复微模块的 targetNode 为 null 的问题

现象:微模块的 mount API 无法获取 targetNode
原因定位:通过日志方式呈现,最终定位原因为 setState 后的执行时序问题
image
image

最终执行时序
image

修复方式:通过将后续的 mount 逻辑放到 setState 回调,保证此时 this.mountNode 是成功赋值的状态
image

最终执行时序正常,问题修复
image

@ClarkXia ClarkXia changed the base branch from master to release-stark-module-1.5.1 March 18, 2024 09:23
@ClarkXia ClarkXia changed the base branch from release-stark-module-1.5.1 to master March 18, 2024 09:24
@ClarkXia
Copy link
Collaborator

补充下复现场景的 demo,方便增加测试用例

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

Successfully merging this pull request may close these issues.

2 participants