Home / Function/ getClassNameByType() — react Function Reference

getClassNameByType() — react Function Reference

Architecture documentation for the getClassNameByType() function in ReactFizzViewTransitionComponent.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  a2040bb3_aa1a_5bb4_0813_e702c58b8f6a["getClassNameByType()"]
  a625ee1f_41da_759d_b96d_f17ee797888e["ReactFizzViewTransitionComponent.js"]
  a2040bb3_aa1a_5bb4_0813_e702c58b8f6a -->|defined in| a625ee1f_41da_759d_b96d_f17ee797888e
  6bddb33c_cc78_8bf2_4b1f_c8c959bf7add["getViewTransitionClassName()"]
  6bddb33c_cc78_8bf2_4b1f_c8c959bf7add -->|calls| a2040bb3_aa1a_5bb4_0813_e702c58b8f6a
  style a2040bb3_aa1a_5bb4_0813_e702c58b8f6a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-server/src/ReactFizzViewTransitionComponent.js lines 29–57

function getClassNameByType(classByType: ?ViewTransitionClass): ?string {
  if (classByType == null || typeof classByType === 'string') {
    return classByType;
  }
  let className: ?string = null;
  const activeTypes = null; // TODO: Support passing active types.
  if (activeTypes !== null) {
    for (let i = 0; i < activeTypes.length; i++) {
      const match = classByType[activeTypes[i]];
      if (match != null) {
        if (match === 'none') {
          // If anything matches "none" that takes precedence over any other
          // type that also matches.
          return 'none';
        }
        if (className == null) {
          className = match;
        } else {
          className += ' ' + match;
        }
      }
    }
  }
  if (className == null) {
    // We had no other matches. Match the default for this configuration.
    return classByType.default;
  }
  return className;
}

Domain

Subdomains

Frequently Asked Questions

What does getClassNameByType() do?
getClassNameByType() is a function in the react codebase, defined in packages/react-server/src/ReactFizzViewTransitionComponent.js.
Where is getClassNameByType() defined?
getClassNameByType() is defined in packages/react-server/src/ReactFizzViewTransitionComponent.js at line 29.
What calls getClassNameByType()?
getClassNameByType() is called by 1 function(s): getViewTransitionClassName.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free