<!-- 感谢您向我们反馈问题,为了高效的解决问题,我们期望你能提供以下信息: --> ## What happens? 由于useModel通过Executor的useEffect做状态同步,导致和useState混用时未充分使用react的批处理能力 <!-- A clear and concise description of what the bug is. --> <!-- 清晰的描述下遇到的问题。--> ## Mini Showcase Repository(REQUIRED) > Please provide a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) then upload to your GitHub. 请提供 [最小重现](https://stackoverflow.com/help/minimal-reproducible-example),并上传到你的 GitHub 仓库 <!-- 为节约大家的时间,无复现步骤的 ISSUE 会被关闭,提供之后再 REOPEN --> <!-- YOUR_REPOSITORY_URL on github or stackbliz --> [最小重现](https://github.com/karthest/umi-bug-report) ## How To Reproduce **Steps to reproduce the behavior:** 1. 某组件中使用useState和useModel 2. 将useState和useModel的state放在同一个useEffect的依赖数组中 3. 在React的事件监听中同时修改useState和useModel的state **Expected behavior** 1. 期望充分利用react的批处理机制导致useEffect只触发一次 <!-- 请提供复现链接/步骤,错误日志以及相关配置 --> ## Context - **Umi Version**: v.4.5.0 - **Node Version**: v20.17.0 - **Platform**: macOS Tahoe 26.0