Add unstable prefix to observedBits prop until its proven to work in practice (#12357)

This commit is contained in:
Andrew Clark
2018-03-12 13:57:33 -07:00
committed by GitHub
parent c7f364d95b
commit 551a0765de
2 changed files with 3 additions and 3 deletions

View File

@@ -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;

View File

@@ -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} />;