Permalink
Browse files

Add unstable prefix to `observedBits` prop until its proven to work i…

…n practice (#12357)
  • Loading branch information...
acdlite committed Mar 12, 2018
1 parent c7f364d commit 551a0765de911f2b266f3f4e9f55d3bf99d635ea
@@ -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} />;

0 comments on commit 551a076

Please sign in to comment.