Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 551a076
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberBeginWork.js
Expand Up @@ -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;
Expand Down
Expand Up @@ -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} />;
Expand All @@ -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} />;
Expand Down

0 comments on commit 551a076

Please sign in to comment.