Home / File/ left.js — react Source File

left.js — react Source File

Architecture documentation for left.js, a javascript file in the react codebase. 2 imports, 0 dependents.

File javascript BabelCompiler Validation 2 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  98d27750_ed11_b3ac_2039_a4a295bb1f54["left.js"]
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  98d27750_ed11_b3ac_2039_a4a295bb1f54 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  8792c1c1_dca5_f137_73ea_c0e268fdbb22["client"]
  98d27750_ed11_b3ac_2039_a4a295bb1f54 --> 8792c1c1_dca5_f137_73ea_c0e268fdbb22
  style 98d27750_ed11_b3ac_2039_a4a295bb1f54 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import * as React from 'react';
import {useState} from 'react';
import {createRoot} from 'react-dom/client';

function createContainer() {
  const container = document.createElement('div');

  ((document.body: any): HTMLBodyElement).appendChild(container);

  return container;
}

function StatefulCounter() {
  const [count, setCount] = useState(0);
  const handleClick = () => setCount(count + 1);
  return <button onClick={handleClick}>Count {count}</button>;
}

createRoot(createContainer()).render(<StatefulCounter />);

Domain

Subdomains

Dependencies

  • client
  • react

Frequently Asked Questions

What does left.js do?
left.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in left.js?
left.js defines 2 function(s): StatefulCounter, createContainer.
What does left.js depend on?
left.js imports 2 module(s): client, react.
Where is left.js in the architecture?
left.js is located at packages/react-devtools-shell/src/multi/left.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shell/src/multi).

Analyze Your Own Codebase

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

Try Supermodel Free