Home / Function/ checkCSSPropertyStringCoercion() — react Function Reference

checkCSSPropertyStringCoercion() — react Function Reference

Architecture documentation for the checkCSSPropertyStringCoercion() function in CheckStringCoercion.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  364b4fbe_73f3_5047_681c_9b3df7648edc["checkCSSPropertyStringCoercion()"]
  5c0b3019_dcaa_8f32_5625_55fc821f3139["CheckStringCoercion.js"]
  364b4fbe_73f3_5047_681c_9b3df7648edc -->|defined in| 5c0b3019_dcaa_8f32_5625_55fc821f3139
  75bb5448_8957_48f0_028c_0032a96afe22["willCoercionThrow()"]
  364b4fbe_73f3_5047_681c_9b3df7648edc -->|calls| 75bb5448_8957_48f0_028c_0032a96afe22
  1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549["typeName()"]
  364b4fbe_73f3_5047_681c_9b3df7648edc -->|calls| 1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549
  a22cd5aa_5df2_c663_36de_5fb3dc6e3e8a["testStringCoercion()"]
  364b4fbe_73f3_5047_681c_9b3df7648edc -->|calls| a22cd5aa_5df2_c663_36de_5fb3dc6e3e8a
  style 364b4fbe_73f3_5047_681c_9b3df7648edc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shared/CheckStringCoercion.js lines 138–153

export function checkCSSPropertyStringCoercion(
  value: mixed,
  propName: string,
): void | string {
  if (__DEV__) {
    if (willCoercionThrow(value)) {
      console.error(
        'The provided `%s` CSS property is an unsupported type %s.' +
          ' This value must be coerced to a string before using it here.',
        propName,
        typeName(value),
      );
      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
    }
  }
}

Domain

Subdomains

Frequently Asked Questions

What does checkCSSPropertyStringCoercion() do?
checkCSSPropertyStringCoercion() is a function in the react codebase, defined in packages/shared/CheckStringCoercion.js.
Where is checkCSSPropertyStringCoercion() defined?
checkCSSPropertyStringCoercion() is defined in packages/shared/CheckStringCoercion.js at line 138.
What does checkCSSPropertyStringCoercion() call?
checkCSSPropertyStringCoercion() calls 3 function(s): testStringCoercion, typeName, willCoercionThrow.

Analyze Your Own Codebase

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

Try Supermodel Free