Home / Function/ shouldSetTextContent() — react Function Reference

shouldSetTextContent() — react Function Reference

Architecture documentation for the shouldSetTextContent() function in ReactFiberConfigNative.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  2046f12b_cbb2_2680_6c88_25ab822d52f0["shouldSetTextContent()"]
  3d20f780_732d_dfbf_ddf9_cb13ba9949a1["ReactFiberConfigNative.js"]
  2046f12b_cbb2_2680_6c88_25ab822d52f0 -->|defined in| 3d20f780_732d_dfbf_ddf9_cb13ba9949a1
  da6635e3_7c29_f39e_c03b_83e7f3ddca5e["createInstance()"]
  2046f12b_cbb2_2680_6c88_25ab822d52f0 -->|calls| da6635e3_7c29_f39e_c03b_83e7f3ddca5e
  style 2046f12b_cbb2_2680_6c88_25ab822d52f0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-native-renderer/src/ReactFiberConfigNative.js lines 333–341

export function shouldSetTextContent(type: string, props: Props): boolean {
  // TODO (bvaughn) Revisit this decision.
  // Always returning false simplifies the createInstance() implementation,
  // But creates an additional child Fiber for raw text children.
  // No additional native views are created though.
  // It's not clear to me which is better so I'm deferring for now.
  // More context @ github.com/facebook/react/pull/8560#discussion_r92111303
  return false;
}

Domain

Subdomains

Frequently Asked Questions

What does shouldSetTextContent() do?
shouldSetTextContent() is a function in the react codebase, defined in packages/react-native-renderer/src/ReactFiberConfigNative.js.
Where is shouldSetTextContent() defined?
shouldSetTextContent() is defined in packages/react-native-renderer/src/ReactFiberConfigNative.js at line 333.
What does shouldSetTextContent() call?
shouldSetTextContent() calls 1 function(s): createInstance.

Analyze Your Own Codebase

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

Try Supermodel Free