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

Introduce forceSyncUpdate to class component #28957

Closed
wants to merge 2 commits into from

Conversation

jzhan-canva
Copy link

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 jzhan-canva changed the title Jzhan force sync update Introduce 1forceSyncUpdate1 to class component Apr 30, 2024
@jzhan-canva jzhan-canva changed the title Introduce 1forceSyncUpdate1 to class component Introduce forceSyncUpdate to class component Apr 30, 2024
@react-sizebot
Copy link

Comparing: d779eba...cec73c1

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 🚫 dangerJS against cec73c1

@jzhan-canva jzhan-canva marked this pull request as ready for review April 30, 2024 13:36
Copy link

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 github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Jul 29, 2024
Copy link

github-actions bot commented Aug 5, 2024

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 github-actions bot closed this Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Resolution: Stale Automatically closed due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants