Home / File/ ReactInstanceMap.js — react Source File

ReactInstanceMap.js — react Source File

Architecture documentation for ReactInstanceMap.js, a javascript file in the react codebase.

Entity Profile

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.
 */

/**
 * `ReactInstanceMap` maintains a mapping from a public facing stateful
 * instance (key) and the internal representation (value). This allows public
 * methods to accept the user facing instance as an argument and map them back
 * to internal methods.
 *
 * Note that this module is currently shared and assumed to be stateless.
 * If this becomes an actual Map, that will break.
 */

export function get(key) {
  return key._reactInternals;
}

export function set(key, value) {
  key._reactInternals = value;
}

Domain

Subdomains

Functions

Frequently Asked Questions

What does ReactInstanceMap.js do?
ReactInstanceMap.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What functions are defined in ReactInstanceMap.js?
ReactInstanceMap.js defines 2 function(s): get, set.
Where is ReactInstanceMap.js in the architecture?
ReactInstanceMap.js is located at packages/shared/ReactInstanceMap.js (domain: BabelCompiler, subdomain: Entrypoint, directory: packages/shared).

Analyze Your Own Codebase

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

Try Supermodel Free