MCPcopy Create free account
hub / github.com/reactjs/react-rails / calculateChangedBits

Function calculateChangedBits

lib/assets/react-source/development/react.js:15624–15639  ·  view source on GitHub ↗
(context, newValue, oldValue)

Source from the content-addressed store, hash-verified

15622 }
15623 }
15624 function calculateChangedBits(context, newValue, oldValue) {
15625 if (objectIs(oldValue, newValue)) {
15626 // No change
15627 return 0;
15628 } else {
15629 var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
15630
15631 {
15632 if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {
15633 error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);
15634 }
15635 }
15636
15637 return changedBits | 0;
15638 }
15639 }
15640 function scheduleWorkOnParentPath(parent, renderExpirationTime) {
15641 // Update the child expiration time of all the ancestors, including
15642 // the alternates.

Callers 1

updateContextProviderFunction · 0.85

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected