MCPcopy Index your code
hub / github.com/react/react / getRenderedAttributeValues

Function getRenderedAttributeValues

fixtures/attribute-behavior/src/App.js:432–474  ·  view source on GitHub ↗
(attribute, type)

Source from the content-addressed store, hash-verified

430
431async function prepareState(initGlobals) {
432 async function getRenderedAttributeValues(attribute, type) {
433 const {
434 ReactStable,
435 ReactDOMStable,
436 ReactDOMServerStable,
437 ReactNext,
438 ReactDOMNext,
439 ReactDOMServerNext,
440 } = initGlobals(attribute, type);
441 const reactStableValue = await getRenderedAttributeValue(
442 ReactStable,
443 ReactDOMStable,
444 ReactDOMServerStable,
445 attribute,
446 type
447 );
448 const reactNextValue = await getRenderedAttributeValue(
449 ReactNext,
450 ReactDOMNext,
451 ReactDOMServerNext,
452 attribute,
453 type
454 );
455
456 let hasSameBehavior;
457 if (reactStableValue.didError && reactNextValue.didError) {
458 hasSameBehavior = true;
459 } else if (!reactStableValue.didError && !reactNextValue.didError) {
460 hasSameBehavior =
461 reactStableValue.didWarn === reactNextValue.didWarn &&
462 reactStableValue.canonicalResult === reactNextValue.canonicalResult &&
463 reactStableValue.ssrHasSameBehavior ===
464 reactNextValue.ssrHasSameBehavior;
465 } else {
466 hasSameBehavior = false;
467 }
468
469 return {
470 reactStable: reactStableValue,
471 reactNext: reactNextValue,
472 hasSameBehavior,
473 };
474 }
475
476 const table = new Map();
477 const rowPatternHashes = new Map();

Callers 1

prepareStateFunction · 0.85

Calls 2

initGlobalsFunction · 0.85

Tested by

no test coverage detected