formily icon indicating copy to clipboard operation
formily copied to clipboard

fix(reactive): avoid unneccessary reaction

Open voderl opened this issue 5 months ago • 1 comments

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?

如果 object 上的某个 key 已经生成 observableResult,get 的值应该就是 observableResult,但是因为没有 set,内部对象值还是 plainobject,在 set 自己时会额外 reaction 一次(某些情况下会导致 react 额外渲染一次)

避免不必要的 reaction

voderl avatar Aug 14 '25 13:08 voderl

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.

CLAassistant avatar Aug 14 '25 13:08 CLAassistant