react icon indicating copy to clipboard operation
react copied to clipboard

Introduce `forceSyncUpdate` to class component

Open jzhan-canva opened this issue 1 year ago • 1 comments

Summary

As described in issue #28897, there is currently no reliable API for a class component to be updated in SyncLane. This API is desired when a class component is subscribed to an external store, e.g. mobx.

Function component can achieve this reliably by using useSyncExternalStore. However, class component may be updated at an arbitrary time.

How did you test this change?

No implement at the moment

jzhan-canva avatar Apr 30 '24 13:04 jzhan-canva

Comparing: d779eba4b375134f373b7dfb9ea98d01c84bc48e...cec73c1e1c80db28b9be5655ab4bf4f7c6b00610

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.66 kB 6.66 kB = 1.82 kB 1.82 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.67 kB 6.67 kB = 1.83 kB 1.83 kB
facebook-www/ReactDOM-prod.classic.js +0.07% 591.11 kB 591.50 kB +0.02% 103.94 kB 103.96 kB
facebook-www/ReactDOM-prod.modern.js +0.07% 567.33 kB 567.73 kB +0.03% 100.34 kB 100.37 kB
test_utils/ReactAllWarnings.js Deleted 64.26 kB 0.00 kB Deleted 16.02 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/react/cjs/react.development.js +1.66% 93.48 kB 95.03 kB +0.36% 25.60 kB 25.69 kB
oss-stable/react/cjs/react.development.js +1.66% 93.50 kB 95.05 kB +0.37% 25.63 kB 25.72 kB
oss-experimental/react/cjs/react.development.js +1.63% 95.17 kB 96.72 kB +0.40% 26.01 kB 26.11 kB
facebook-react-native/react/cjs/React-dev.js +1.37% 113.13 kB 114.68 kB +0.35% 29.43 kB 29.53 kB
facebook-www/React-dev.modern.js +1.33% 116.14 kB 117.69 kB +0.34% 30.11 kB 30.21 kB
facebook-www/React-dev.classic.js +1.33% 116.63 kB 118.18 kB +0.34% 30.22 kB 30.32 kB
oss-stable-semver/react/cjs/react.production.js +1.07% 16.87 kB 17.05 kB +0.48% 4.39 kB 4.41 kB
oss-stable/react/cjs/react.production.js +1.07% 16.89 kB 17.07 kB +0.43% 4.42 kB 4.44 kB
oss-experimental/react/cjs/react.production.js +1.00% 18.01 kB 18.20 kB +0.41% 4.68 kB 4.70 kB
facebook-react-native/react/cjs/React-prod.js +0.83% 21.88 kB 22.06 kB +0.30% 5.74 kB 5.75 kB
facebook-react-native/react/cjs/React-profiling.js +0.81% 22.32 kB 22.50 kB +0.33% 5.81 kB 5.83 kB
facebook-www/React-prod.modern.js +0.80% 22.68 kB 22.86 kB +0.39% 5.84 kB 5.86 kB
facebook-www/React-prod.classic.js +0.80% 22.68 kB 22.86 kB +0.38% 5.84 kB 5.86 kB
facebook-www/React-profiling.modern.js +0.78% 23.12 kB 23.30 kB +0.39% 5.92 kB 5.94 kB
facebook-www/React-profiling.classic.js +0.78% 23.12 kB 23.30 kB +0.37% 5.92 kB 5.94 kB
test_utils/ReactAllWarnings.js Deleted 64.26 kB 0.00 kB Deleted 16.02 kB 0.00 kB

Generated by :no_entry_sign: dangerJS against cec73c1e1c80db28b9be5655ab4bf4f7c6b00610

react-sizebot avatar Apr 30 '24 13:04 react-sizebot

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

github-actions[bot] avatar Jul 29 '24 14:07 github-actions[bot]

Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!

github-actions[bot] avatar Aug 05 '24 15:08 github-actions[bot]