Home / Function/ render() — react Function Reference

render() — react Function Reference

Architecture documentation for the render() function in ReactNewContext-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  d7d0e782_986c_5f28_c10c_5b793766136b["render()"]
  0987dd43_7572_60b9_a186_d064f3a52a20["ConsumerTree"]
  d7d0e782_986c_5f28_c10c_5b793766136b -->|defined in| 0987dd43_7572_60b9_a186_d064f3a52a20
  style d7d0e782_986c_5f28_c10c_5b793766136b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/__tests__/ReactNewContext-test.js lines 1515–1542

        render() {
          Scheduler.log();
          if (this.props.depth >= this.props.maxDepth) {
            return null;
          }
          const consumers = [0, 1, 2].map(i => {
            const randomKey =
              contextKeys[
                this.props.rand.intBetween(0, contextKeys.length - 1)
              ];
            const Context = contexts.get(randomKey);
            return (
              <Context.Consumer key={i}>
                {value => (
                  <>
                    <span prop={`${randomKey}:${value}`} />
                    <ConsumerTree
                      rand={this.props.rand}
                      depth={this.props.depth + 1}
                      maxDepth={this.props.maxDepth}
                    />
                  </>
                )}
              </Context.Consumer>
            );
          });
          return consumers;
        }

Domain

Subdomains

Frequently Asked Questions

What does render() do?
render() is a function in the react codebase, defined in packages/react-reconciler/src/__tests__/ReactNewContext-test.js.
Where is render() defined?
render() is defined in packages/react-reconciler/src/__tests__/ReactNewContext-test.js at line 1515.

Analyze Your Own Codebase

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

Try Supermodel Free