mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Add unstable prefix to observedBits prop until its proven to work in practice (#12357)
This commit is contained in:
@@ -953,7 +953,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
|
||||
}
|
||||
workInProgress.memoizedProps = newProps;
|
||||
|
||||
let observedBits = newProps.observedBits;
|
||||
let observedBits = newProps.unstable_observedBits;
|
||||
if (observedBits === undefined || observedBits === null) {
|
||||
// Subscribe to all changes by default
|
||||
observedBits = MAX_SIGNED_31_BIT_INT;
|
||||
|
||||
@@ -516,7 +516,7 @@ describe('ReactNewContext', () => {
|
||||
|
||||
function Foo() {
|
||||
return (
|
||||
<Context.Consumer observedBits={0b01}>
|
||||
<Context.Consumer unstable_observedBits={0b01}>
|
||||
{value => {
|
||||
ReactNoop.yield('Foo');
|
||||
return <span prop={'Foo: ' + value.foo} />;
|
||||
@@ -527,7 +527,7 @@ describe('ReactNewContext', () => {
|
||||
|
||||
function Bar() {
|
||||
return (
|
||||
<Context.Consumer observedBits={0b10}>
|
||||
<Context.Consumer unstable_observedBits={0b10}>
|
||||
{value => {
|
||||
ReactNoop.yield('Bar');
|
||||
return <span prop={'Bar: ' + value.bar} />;
|
||||
|
||||
Reference in New Issue
Block a user