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(reactive): fix reaction scheduler prevent setState rerender #2610

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

janryWang
Copy link
Collaborator

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?

之前给reaction scheduler加了untrack,但是如果在scheduler里调用setState,会影响数据收集,还是需要回退回去,不过之前加untrack是为了解决 #2563 这个问题,所以针对该问题单独做untrack即可

@codecov
Copy link

codecov bot commented Dec 10, 2021

Codecov Report

Merging #2610 (01078d9) into formily_next (e2dfc0b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff                @@
##           formily_next    #2610      +/-   ##
================================================
+ Coverage         95.70%   95.72%   +0.01%     
================================================
  Files               142      142              
  Lines              6334     6335       +1     
  Branches           1677     1677              
================================================
+ Hits               6062     6064       +2     
+ Misses              272      271       -1     
Impacted Files Coverage Δ
packages/reactive/src/autorun.ts 100.00% <ø> (ø)
packages/core/src/models/Field.ts 98.55% <100.00%> (ø)
packages/core/src/shared/internals.ts 100.00% <100.00%> (ø)
packages/reactive/src/reaction.ts 96.81% <0.00%> (+0.63%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2dfc0b...01078d9. Read the comment docs.

@github-actions
Copy link
Contributor

Size Change: +144 B (0%)

Total Size: 456 kB

Filename Size Change
packages/core/dist/formily.core.umd.development.js 19.3 kB +44 B (0%)
packages/core/dist/formily.core.umd.production.js 13.1 kB +21 B (0%)
packages/reactive/dist/formily.reactive.umd.development.js 9.3 kB +90 B (+1%)
packages/reactive/dist/formily.reactive.umd.production.js 5.21 kB -11 B (0%)
ℹ️ View Unchanged
Filename Size
packages/antd/dist/formily.antd.umd.development.js 60 kB
packages/antd/dist/formily.antd.umd.production.js 34.4 kB
packages/element/dist/formily.element.umd.development.js 58.3 kB
packages/element/dist/formily.element.umd.production.js 33.8 kB
packages/grid/dist/formily.grid.umd.development.js 4.81 kB
packages/grid/dist/formily.grid.umd.production.js 3.44 kB
packages/json-schema/dist/formily.json-schema.umd.development.js 6.88 kB
packages/json-schema/dist/formily.json-schema.umd.production.js 4.35 kB
packages/next/dist/formily.next.umd.development.js 65.2 kB
packages/next/dist/formily.next.umd.production.js 38.6 kB
packages/path/dist/formily.path.umd.development.js 11.1 kB
packages/path/dist/formily.path.umd.production.js 7.66 kB
packages/react/dist/formily.react.umd.development.js 11.4 kB
packages/react/dist/formily.react.umd.production.js 7.07 kB
packages/reactive-react/dist/formily.reactive-react.umd.development.js 3.61 kB
packages/reactive-react/dist/formily.reactive-react.umd.production.js 2.25 kB
packages/reactive-vue/dist/formily.reactive-vue.umd.development.js 2.86 kB
packages/reactive-vue/dist/formily.reactive-vue.umd.production.js 1.81 kB
packages/shared/dist/formily.shared.umd.development.js 7.39 kB
packages/shared/dist/formily.shared.umd.production.js 4.2 kB
packages/validator/dist/formily.validator.umd.development.js 8.42 kB
packages/validator/dist/formily.validator.umd.production.js 6.26 kB
packages/vue/dist/formily.vue.umd.development.js 16.1 kB
packages/vue/dist/formily.vue.umd.production.js 9.66 kB

compressed-size-action

@janryWang janryWang merged commit e743200 into formily_next Dec 10, 2021
@janryWang janryWang deleted the fix_reaction_prevent_setState branch December 10, 2021 03:56
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.

1 participant