GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove unstable_changedBits by acdlite · Pull Request #20953 · react/react

Conversation

@acdlite

@acdlite acdlite commented Mar 8, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

We added this unstable feature a few years ago, as a way to opt out of context updates, but it didn't prove useful in practice.

We have other proposals for how to address the same problem, like context selectors.

Since it was prefixed with unstable_, we should be able to remove it without consequence. The hook API already warned if you used it.

Even if someone is using it somewhere, it's meant to be an optimization only, so if they are using the API properly, it should not have any semantic impact.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dai-shi, apostolos, NE-SmallTown, azahariev, Naturalclar, and washingtonsoares reacted with thumbs up emoji
All reactions
  • 👍 6 reactions
@acdlite
Remove unstable_changedBits
efad8ac
We added this unstable feature a few years ago, as a way to opt out of
context updates, but it didn't prove useful in practice.

We have other proposals for how to address the same problem, like
context selectors.

Since it was prefixed with `unstable_`, we should be able to remove it
without consequence. The hook API already warned if you used it.

Even if someone is using it somewhere, it's meant to be an optimization
only, so if they are using the API properly, it should not have any
semantic impact.
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Mar 8, 2021
acdlite
acdlite commented Mar 8, 2021
View reviewed changes
Comment thread packages/react-reconciler/src/__tests__/ReactNewContext-test.js Outdated

@acdlite acdlite Mar 8, 2021

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These have corresponding tests in the context selectors PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sizebot

sizebot commented Mar 8, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Comparing: 5fe091c...efad8ac

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.min.js = 123.31 kB 123.06 kB = 39.68 kB 39.58 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 129.90 kB 129.60 kB = 41.70 kB 41.57 kB
facebook-www/ReactDOM-prod.classic.js = 414.59 kB 413.17 kB = 76.58 kB 76.29 kB
facebook-www/ReactDOM-prod.modern.js = 402.93 kB 401.51 kB = 74.69 kB 74.39 kB
facebook-www/ReactDOMForked-prod.classic.js = 414.60 kB 413.18 kB = 76.59 kB 76.29 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 123.31 kB 123.06 kB = 39.68 kB 39.58 kB
facebook-www/ReactDOMTesting-dev.classic.js = 978.86 kB 976.83 kB = 219.96 kB 219.48 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js = 254.01 kB 253.48 kB = 46.59 kB 46.44 kB
oss-stable/react-dom/umd/react-dom.production.min.js = 123.23 kB 122.97 kB = 40.32 kB 40.19 kB
facebook-www/ReactDOMTesting-dev.modern.js = 949.78 kB 947.75 kB = 213.81 kB 213.33 kB
facebook-www/ReactDOMTesting-prod.classic.js = 401.28 kB 400.42 kB = 75.82 kB 75.66 kB
oss-experimental/react-dom/umd/react-dom.profiling.min.js = 136.04 kB 135.75 kB = 44.29 kB 44.18 kB
oss-experimental/react-dom/cjs/react-dom.profiling.min.js = 136.39 kB 136.10 kB = 43.68 kB 43.54 kB
oss-stable/react-art/umd/react-art.production.min.js = 113.27 kB 113.02 kB = 35.28 kB 35.15 kB
facebook-www/ReactDOMTesting-prod.modern.js = 387.68 kB 386.82 kB = 73.56 kB 73.38 kB
facebook-www/ReactDOMForked-dev.classic.js = 1,072.21 kB 1,069.78 kB = 237.13 kB 236.53 kB
facebook-www/ReactDOM-dev.classic.js = 1,072.20 kB 1,069.77 kB = 237.38 kB 236.78 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js = 241.47 kB 240.92 kB = 44.34 kB 44.21 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 129.90 kB 129.60 kB = 41.70 kB 41.57 kB
oss-experimental/react-dom/umd/react-dom.production.min.js = 129.73 kB 129.43 kB = 42.38 kB 42.22 kB
facebook-www/ReactDOMForked-dev.modern.js = 1,045.95 kB 1,043.52 kB = 231.95 kB 231.35 kB
facebook-www/ReactDOM-dev.modern.js = 1,045.94 kB 1,043.51 kB = 232.21 kB 231.61 kB
oss-experimental/react-art/umd/react-art.production.min.js = 118.17 kB 117.86 kB = 36.81 kB 36.68 kB
oss-experimental/react-art/umd/react-art.development.js = 745.94 kB 743.99 kB = 158.74 kB 158.21 kB
oss-stable/react-art/umd/react-art.development.js = 701.28 kB 699.41 kB = 149.67 kB 149.19 kB
oss-experimental/react-reconciler/cjs/react-reconciler.development.js = 702.79 kB 700.90 kB = 150.35 kB 149.86 kB
oss-stable/react-reconciler/cjs/react-reconciler.profiling.min.js = 91.87 kB 91.62 kB = 28.43 kB 28.32 kB
oss-stable/react-reconciler/cjs/react-reconciler.development.js = 657.65 kB 655.83 kB = 141.22 kB 140.79 kB
react-native/implementations/ReactNativeRenderer-dev.fb.js = 720.97 kB 718.94 kB = 156.35 kB 155.85 kB
react-native/implementations/ReactNativeRenderer-dev.js = 715.41 kB 713.38 kB = 155.41 kB 154.88 kB
oss-stable/react-reconciler/cjs/react-reconciler.production.min.js = 87.53 kB 87.28 kB = 27.19 kB 27.07 kB
react-native/implementations/ReactFabric-dev.fb.js = 702.67 kB 700.64 kB = 151.57 kB 151.07 kB
react-native/implementations/ReactFabric-dev.js = 697.09 kB 695.06 kB = 150.71 kB 150.20 kB
oss-stable/react-test-renderer/umd/react-test-renderer.development.js = 640.63 kB 638.75 kB = 135.50 kB 135.03 kB
oss-experimental/react-art/cjs/react-art.development.js = 642.86 kB 640.97 kB = 140.13 kB 139.64 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.development.js = 657.48 kB 655.53 kB = 138.91 kB 138.41 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.development.js = 610.26 kB 608.45 kB = 133.87 kB 133.42 kB
oss-experimental/react-reconciler/cjs/react-reconciler.profiling.min.js = 99.38 kB 99.09 kB = 30.76 kB 30.62 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.development.js = 626.27 kB 624.38 kB = 137.26 kB 136.78 kB
oss-stable/react-art/cjs/react-art.development.js = 600.38 kB 598.56 kB = 131.48 kB 131.05 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.production.min.js = 80.34 kB 80.09 kB = 25.08 kB 25.00 kB
oss-stable/react-test-renderer/umd/react-test-renderer.production.min.js = 80.52 kB 80.27 kB = 25.37 kB 25.25 kB
oss-experimental/react-reconciler/cjs/react-reconciler.production.min.js = 92.89 kB 92.59 kB = 28.81 kB 28.67 kB
facebook-www/ReactTestRenderer-dev.modern.js = 634.47 kB 632.44 kB = 136.42 kB 135.91 kB
facebook-www/ReactTestRenderer-dev.classic.js = 634.46 kB 632.43 kB = 136.41 kB 135.90 kB
oss-stable/react-art/cjs/react-art.production.min.js = 77.45 kB 77.20 kB = 24.16 kB 24.09 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-dev.js = 621.62 kB 619.59 kB = 134.96 kB 134.45 kB
facebook-www/ReactDOMForked-profiling.classic.js = 434.52 kB 433.10 kB = 80.07 kB 79.76 kB
facebook-www/ReactDOM-profiling.classic.js = 434.51 kB 433.09 kB = 80.07 kB 79.76 kB
oss-experimental/react-cache/cjs/react-cache.development.js = 8.41 kB 8.38 kB = 2.82 kB 2.81 kB
oss-stable/react-cache/cjs/react-cache.development.js = 8.41 kB 8.38 kB = 2.82 kB 2.81 kB
facebook-www/ReactDOMForked-profiling.modern.js = 422.81 kB 421.39 kB = 78.22 kB 77.92 kB
facebook-www/ReactDOM-profiling.modern.js = 422.80 kB 421.38 kB = 78.22 kB 77.92 kB
facebook-www/ReactART-dev.classic.js = 714.51 kB 712.08 kB = 151.76 kB 151.19 kB
facebook-www/ReactDOMForked-prod.classic.js = 414.60 kB 413.18 kB = 76.59 kB 76.29 kB
facebook-www/ReactDOM-prod.classic.js = 414.59 kB 413.17 kB = 76.58 kB 76.29 kB
facebook-www/ReactART-dev.modern.js = 704.22 kB 701.79 kB = 149.67 kB 149.10 kB
facebook-www/ReactDOMForked-prod.modern.js = 402.94 kB 401.52 kB = 74.70 kB 74.40 kB
facebook-www/ReactDOM-prod.modern.js = 402.93 kB 401.51 kB = 74.69 kB 74.39 kB
oss-experimental/react/umd/react.profiling.min.js = 14.34 kB 14.29 kB = 5.30 kB 5.28 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.production.min.js = 82.94 kB 82.63 kB = 26.28 kB 26.10 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.production.min.js = 82.76 kB 82.46 kB = 25.90 kB 25.75 kB
oss-experimental/react-art/cjs/react-art.production.min.js = 82.29 kB 81.98 kB = 25.66 kB 25.51 kB
oss-stable/react/umd/react.profiling.min.js = 13.29 kB 13.24 kB = 5.00 kB 4.98 kB
oss-experimental/react/umd/react.production.min.js = 12.12 kB 12.07 kB = 4.75 kB 4.72 kB
oss-stable/react/umd/react.production.min.js = 11.07 kB 11.02 kB = 4.46 kB 4.43 kB
facebook-www/ReactART-prod.classic.js = 267.92 kB 266.50 kB = 47.52 kB 47.20 kB
facebook-www/ReactART-prod.modern.js = 260.56 kB 259.14 kB = 46.24 kB 45.94 kB
oss-experimental/react/cjs/react.production.min.js = 7.59 kB 7.54 kB = 2.95 kB 2.93 kB
oss-experimental/react/cjs/react-unstable-shared-subset.development.js = 67.64 kB 67.15 kB = 18.40 kB 18.26 kB
oss-stable/react/cjs/react.production.min.js = 6.44 kB 6.39 kB = 2.66 kB 2.63 kB
oss-experimental/react/umd/react.development.js = 107.04 kB 106.17 kB = 26.47 kB 26.27 kB
oss-stable/react/umd/react.development.js = 104.77 kB 103.91 kB = 26.06 kB 25.89 kB
facebook-www/React-dev.classic.js = 99.65 kB 98.65 kB = 24.23 kB 24.04 kB
facebook-www/React-dev.modern.js = 98.63 kB 97.63 kB = 24.00 kB 23.81 kB
facebook-react-native/react/cjs/React-dev.js = 89.61 kB 88.61 kB = 21.49 kB 21.28 kB
oss-experimental/react/cjs/react.development.js = 74.55 kB 73.71 kB = 19.94 kB 19.77 kB
facebook-www/React-prod.classic.js = 17.09 kB 16.90 kB = 4.43 kB 4.37 kB
facebook-www/React-profiling.classic.js = 17.09 kB 16.90 kB = 4.43 kB 4.37 kB
facebook-www/React-prod.modern.js = 16.95 kB 16.75 kB = 4.38 kB 4.32 kB
facebook-www/React-profiling.modern.js = 16.95 kB 16.75 kB = 4.38 kB 4.32 kB
oss-stable/react/cjs/react.development.js = 72.40 kB 71.55 kB = 19.54 kB 19.35 kB
facebook-react-native/react/cjs/React-prod.js = 16.79 kB 16.59 kB = 4.31 kB 4.25 kB
facebook-react-native/react/cjs/React-profiling.js = 16.79 kB 16.59 kB = 4.31 kB 4.25 kB

Generated by 🚫 dangerJS against efad8ac

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@acdlite
acdlite force-pushed the remove-changedbits branch 4 times, most recently from 6c4d404 to efad8ac Compare March 8, 2021 20:07
gaearon
gaearon approved these changes Mar 11, 2021
View reviewed changes

@gaearon gaearon left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do it?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tjallingt, NE-SmallTown, tatchi, sandeep1995, Mathspy, and marshcat0 reacted with rocket emoji
All reactions
  • 🚀 6 reactions
@acdlite
acdlite merged commit 6d3ecb7 into react:master Mar 19, 2021
@gaearon
gaearon deleted the remove-changedbits branch March 20, 2021 02:11
@gaearon
gaearon restored the remove-changedbits branch March 20, 2021 02:11
@gaearon
gaearon deleted the remove-changedbits branch March 20, 2021 02:11
@gaearon
gaearon restored the remove-changedbits branch March 20, 2021 02:11
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Mar 23, 2021
@acdlite @zhengjitf
Remove unstable_changedBits (react#20953)
6808645
We added this unstable feature a few years ago, as a way to opt out of
context updates, but it didn't prove useful in practice.

We have other proposals for how to address the same problem, like
context selectors.

Since it was prefixed with `unstable_`, we should be able to remove it
without consequence. The hook API already warned if you used it.

Even if someone is using it somewhere, it's meant to be an optimization
only, so if they are using the API properly, it should not have any
semantic impact.
facebook-github-bot pushed a commit to react/react-native that referenced this pull request Mar 23, 2021
@rickhanlonii @facebook-github-bot
React Native sync for revisions c9f6d0a...6d3ecb7
563b42b
Summary:
This sync includes the following changes:
- **[6d3ecb7](react/react@6d3ecb70d )**: Remove unstable_changedBits ([#20953](react/react#20953)) //<Andrew Clark>//
- **[754e307](react/react@754e30728 )**: Delete immediateQueueCallbackNode ([#20980](react/react#20980)) //<Andrew Clark>//
- **[be5a2e2](react/react@be5a2e231 )**: Land enableSyncMicrotasks ([#20979](react/react#20979)) //<Andrew Clark>//
- **[f6bc9c8](react/react@f6bc9c824 )**: [Fizz] Expose maxBoundarySize as an option ([#21029](react/react#21029)) //<Sebastian Markbåge>//
- **[154b852](react/react@154b85213 )**: [Fizz] Expose a method to explicitly start writing to a Node stream ([#21028](react/react#21028)) //<Sebastian Markbåge>//
- **[cf485e6](react/react@cf485e6f6 )**: [Fizz] Expose a method to abort a pending request ([#21027](react/react#21027)) //<Sebastian Markbåge>//
- **[3fb11ee](react/react@3fb11eed9 )**: React Native: Touch Instrumentation Interface ([#21024](react/react#21024)) //<Timothy Yung>//
- **[825c302](react/react@825c3021f )**: Don't delete trailing mismatches during hydration at the root ([#21021](react/react#21021)) //<Sebastian Markbåge>//
- **[1d1e49c](react/react@1d1e49cfa )**: [Fizz] Assign an ID to the first DOM element in a fallback or insert a dummy (and testing infra) ([#21020](react/react#21020)) //<Sebastian Markbåge>//
- **[466b26c](react/react@466b26c92 )**: Store commit durations on HostRoot for DevTools access ([#20983](react/react#20983)) //<Brian Vaughn>//
- **[89acfa6](react/react@89acfa639 )**: Fix native event batching in concurrent mode ([#21010](react/react#21010)) //<Ricky>//
- **[0203b65](react/react@0203b6567 )**: chore: update react-reconciler README ([#21016](react/react#21016)) //<susiwen8>//

Changelog:
[General][Changed] - React Native sync for revisions c9f6d0a...6d3ecb7

jest_e2e[run_all_tests]

Reviewed By: JoshuaGross, kacieb

Differential Revision: D27231625

fbshipit-source-id: 89c0c0662e69044ae8890486a693013bee6005dd
koto pushed a commit to koto/react that referenced this pull request Jun 15, 2021
@acdlite @koto
Remove unstable_changedBits (react#20953)
e729c72
We added this unstable feature a few years ago, as a way to opt out of
context updates, but it didn't prove useful in practice.

We have other proposals for how to address the same problem, like
context selectors.

Since it was prefixed with `unstable_`, we should be able to remove it
without consequence. The hook API already warned if you used it.

Even if someone is using it somewhere, it's meant to be an optimization
only, so if they are using the API properly, it should not have any
semantic impact.
@mysteryven mysteryven mentioned this pull request Dec 11, 2021
createContext 的第二个参数优化更新的用法要被移除了 MinJieLiu/heo#4
Closed
@gaearon gaearon mentioned this pull request Mar 29, 2022
Add React 18 changelog #24195
Merged
@edriang

edriang commented Apr 11, 2022

Copy link
Copy Markdown

Hey there! The use-context-selection used the unstable_changedBits argument to provide a way to "selectively" update views consuming parts of a major state-tree (Context).

I completely understand the feature was marked as unstable and thereby there were risk for it to be removed.

This comment is just to ask/check if there is a 1:1 replacement I could use/explore to support a similar behavior and integrate in the mentioned library (?)

Otherwise, I think I'll update the library Readme to make it clear this won't work for React >= 18, and probably suggest opting for https://github.com/dai-shi/use-context-selector instead

Thanks in advance for any help!

dai-shi reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@edriang edriang mentioned this pull request Apr 11, 2022
rerenders on RN 0.68 edriang/use-context-selection#6
Closed
@gaearon

gaearon commented Apr 11, 2022

Copy link
Copy Markdown
Collaborator

Sorry, there is no 1:1 replacement. There's been initial work on #20646, but it is currently paused.

edriang reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

JinmuGo added a commit to 42ForYou/RFS that referenced this pull request Mar 17, 2024
@JinmuGo
FY-215/perf(changedBits): remove
f423bed
changedBits 삭제

react/react#20953
JinmuGo added a commit to 42ForYou/RFS that referenced this pull request Mar 17, 2024
@JinmuGo
FY-215/feature context refactoring (#37)
258f2da
* FY-215/perf(changedBits): remove

changedBits 삭제

react/react#20953

* FY-215/refactor: remove threadcount

* FY-215/refactor: remove rendererSigil

* FY-215/refactor: project

* FY-215/refactor: remain observedBits
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
@acdlite
Remove unstable_changedBits (react#20953)
2dade83
We added this unstable feature a few years ago, as a way to opt out of
context updates, but it didn't prove useful in practice.

We have other proposals for how to address the same problem, like
context selectors.

Since it was prefixed with `unstable_`, we should be able to remove it
without consequence. The hook API already warned if you used it.

Even if someone is using it somewhere, it's meant to be an optimization
only, so if they are using the API properly, it should not have any
semantic impact.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@acdlite
Remove unstable_changedBits (react#20953)
6120d9a
We added this unstable feature a few years ago, as a way to opt out of
context updates, but it didn't prove useful in practice.

We have other proposals for how to address the same problem, like
context selectors.

Since it was prefixed with `unstable_`, we should be able to remove it
without consequence. The hook API already warned if you used it.

Even if someone is using it somewhere, it's meant to be an optimization
only, so if they are using the API properly, it should not have any
semantic impact.
This was referenced Nov 22, 2026
deps: update react to 19.3.1 codexempire/chat_space_app#6
Open
deps: update react-dom to 19.3.1 codexempire/chat_space_app#7
Open
deps: update react to 19.3.1 codexempire/flight-check#8
Open
@github-actions github-actions Bot mentioned this pull request Nov 22, 2026
deps: update react-dom to 19.3.1 codexempire/flight-check#9
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gaearon gaearon gaearon approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@acdlite @sizebot @edriang @gaearon @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.