Skip to content

Conversation

@voderl
Copy link

@voderl voderl commented Aug 21, 2025

Before submitting a pull request, please make sure the following is done...

  • [✅] Ensure the pull request title and commit message follow the Commit Specific in English.
  • [ ✅] Fork the repo and create your branch from master or formily_next.
  • [ ✅] If you've added code that should be tested, add tests!
  • If you've changed APIs, update the documentation.
  • [✅ ] Ensure the test suite passes (npm test).
  • [ ✅] Make sure your code lints (npm run lint) - we've done our best to make sure these rules match our internal linting guidelines.

Please do not delete the above content


What have you changed?

可以查看最新的单个 commit 来看当前 pr 更改内容。

避免因链式响应,比如 fn1 收集依赖 A,fn2 收集并更新依赖 A,在 A 改变时,触发 fn1 和 fn2,其中 fn2 再次触发 fn1 时,因为 fn1 的防死循环机制(_boundary) ,导致 fn1 不能被再次触发获取到最新的依赖 A。

链式响应应该确保本身不会被再次执行,同时只需要触发最新的一次响应。
比如是先 fn1 再 fn2 的顺序,应该先执行 fn1 再执行 fn2 再执行 fn1 (一定会执行最新的一次)
如果两个函数调换顺序,则应该只需要执行 fn2 fn1,fn1 只会被执行一次(一定会执行最新的一次)

具体的响应策略和之前的 pr 不太一致,但想要解决的问题是一致的。

#4255

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@voderl voderl force-pushed the fix-missing-reaction branch from 42012d8 to 50a9115 Compare September 9, 2025 06:35
@voderl voderl force-pushed the fix-missing-reaction branch from 50a9115 to 5dd1710 Compare September 10, 2025 02:25
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