Home / Function/ normalizeMarkupForTextOrAttribute() — react Function Reference

normalizeMarkupForTextOrAttribute() — react Function Reference

Architecture documentation for the normalizeMarkupForTextOrAttribute() function in ReactDOMComponent.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  57761175_2a1a_5685_f5bf_d3220c6d038a["normalizeMarkupForTextOrAttribute()"]
  18e0625c_4c5e_21aa_769f_5a8cf7e16a77["ReactDOMComponent.js"]
  57761175_2a1a_5685_f5bf_d3220c6d038a -->|defined in| 18e0625c_4c5e_21aa_769f_5a8cf7e16a77
  e72a2d61_a66e_6fea_659a_a53413bf9141["warnForPropDifference()"]
  e72a2d61_a66e_6fea_659a_a53413bf9141 -->|calls| 57761175_2a1a_5685_f5bf_d3220c6d038a
  d4f00229_cfdb_0950_5fd7_c54ecc3e26b5["checkForUnmatchedText()"]
  d4f00229_cfdb_0950_5fd7_c54ecc3e26b5 -->|calls| 57761175_2a1a_5685_f5bf_d3220c6d038a
  82418c23_f5c4_e8e3_c237_c02b8a83e7f9["diffHydratedStyles()"]
  82418c23_f5c4_e8e3_c237_c02b8a83e7f9 -->|calls| 57761175_2a1a_5685_f5bf_d3220c6d038a
  e7c9e51e_d5d3_f90e_6fc5_a9f23dad6430["hydrateText()"]
  e7c9e51e_d5d3_f90e_6fc5_a9f23dad6430 -->|calls| 57761175_2a1a_5685_f5bf_d3220c6d038a
  style 57761175_2a1a_5685_f5bf_d3220c6d038a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom-bindings/src/client/ReactDOMComponent.js lines 346–354

function normalizeMarkupForTextOrAttribute(markup: mixed): string {
  if (__DEV__) {
    checkHtmlStringCoercion(markup);
  }
  const markupString = typeof markup === 'string' ? markup : '' + (markup: any);
  return markupString
    .replace(NORMALIZE_NEWLINES_REGEX, '\n')
    .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
}

Domain

Subdomains

Frequently Asked Questions

What does normalizeMarkupForTextOrAttribute() do?
normalizeMarkupForTextOrAttribute() is a function in the react codebase, defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js.
Where is normalizeMarkupForTextOrAttribute() defined?
normalizeMarkupForTextOrAttribute() is defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js at line 346.
What calls normalizeMarkupForTextOrAttribute()?
normalizeMarkupForTextOrAttribute() is called by 4 function(s): checkForUnmatchedText, diffHydratedStyles, hydrateText, warnForPropDifference.

Analyze Your Own Codebase

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

Try Supermodel Free