ReactJSXElement.js — react Source File
Architecture documentation for ReactJSXElement.js, a javascript file in the react codebase. 8 imports, 8 dependents.
Entity Profile
Dependency Diagram
graph LR 1bf5591f_27a1_c79f_853a_6242549e0e07["ReactJSXElement.js"] 3c38cd62_f628_0c7b_096c_856305caeada["getComponentNameFromType"] 1bf5591f_27a1_c79f_853a_6242549e0e07 --> 3c38cd62_f628_0c7b_096c_856305caeada 1c5695a6_6806_ba54_2074_efc779e66da4["ReactSharedInternals"] 1bf5591f_27a1_c79f_853a_6242549e0e07 --> 1c5695a6_6806_ba54_2074_efc779e66da4 a413acd5_7541_e904_f255_d4dd9b5e5bc1["hasOwnProperty"] 1bf5591f_27a1_c79f_853a_6242549e0e07 --> a413acd5_7541_e904_f255_d4dd9b5e5bc1 326b1b33_c1be_450b_f53b_51a78bbe8633["assign"] 1bf5591f_27a1_c79f_853a_6242549e0e07 --> 326b1b33_c1be_450b_f53b_51a78bbe8633 e1e1de60_2be4_0643_45fb_e2c306735427["ReactSymbols"] 1bf5591f_27a1_c79f_853a_6242549e0e07 --> e1e1de60_2be4_0643_45fb_e2c306735427 0ae63ebd_b26a_05c8_1c6d_275a5f6b76c7["CheckStringCoercion"] 1bf5591f_27a1_c79f_853a_6242549e0e07 --> 0ae63ebd_b26a_05c8_1c6d_275a5f6b76c7 af78c51d_c7cb_3bf4_550f_f3fcc48f4f34["isArray"] 1bf5591f_27a1_c79f_853a_6242549e0e07 --> af78c51d_c7cb_3bf4_550f_f3fcc48f4f34 8344de1b_978c_be0f_eebd_38ccc4962a93["ReactFeatureFlags"] 1bf5591f_27a1_c79f_853a_6242549e0e07 --> 8344de1b_978c_be0f_eebd_38ccc4962a93 511230ce_1ad3_362f_884f_97bae6263b2d["ReactChildren.js"] 511230ce_1ad3_362f_884f_97bae6263b2d --> 1bf5591f_27a1_c79f_853a_6242549e0e07 ffdf54f0_7e34_f1e9_1504_9dbadb0fbac5["ReactClient.js"] ffdf54f0_7e34_f1e9_1504_9dbadb0fbac5 --> 1bf5591f_27a1_c79f_853a_6242549e0e07 a893f937_cfbc_33f8_94ec_23cb5000691e["ReactServer.experimental.development.js"] a893f937_cfbc_33f8_94ec_23cb5000691e --> 1bf5591f_27a1_c79f_853a_6242549e0e07 8510e4c8_924c_b1b8_d0a0_11cb99b570c0["ReactServer.experimental.js"] 8510e4c8_924c_b1b8_d0a0_11cb99b570c0 --> 1bf5591f_27a1_c79f_853a_6242549e0e07 6274036e_add3_9702_84fb_266b97b7660a["ReactServer.fb.js"] 6274036e_add3_9702_84fb_266b97b7660a --> 1bf5591f_27a1_c79f_853a_6242549e0e07 a86f40a1_cfab_7bca_7368_f11f9ee52c80["ReactServer.js"] a86f40a1_cfab_7bca_7368_f11f9ee52c80 --> 1bf5591f_27a1_c79f_853a_6242549e0e07 style 1bf5591f_27a1_c79f_853a_6242549e0e07 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 getComponentNameFromType from 'shared/getComponentNameFromType';
import ReactSharedInternals from 'shared/ReactSharedInternals';
import hasOwnProperty from 'shared/hasOwnProperty';
import assign from 'shared/assign';
import {
REACT_ELEMENT_TYPE,
REACT_FRAGMENT_TYPE,
REACT_LAZY_TYPE,
REACT_OPTIMISTIC_KEY,
} from 'shared/ReactSymbols';
import {checkKeyStringCoercion} from 'shared/CheckStringCoercion';
import isArray from 'shared/isArray';
import {ownerStackLimit, enableOptimisticKey} from 'shared/ReactFeatureFlags';
const createTask =
// eslint-disable-next-line react-internal/no-production-logging
__DEV__ && console.createTask
? // eslint-disable-next-line react-internal/no-production-logging
console.createTask
: () => null;
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) {
return '<>';
}
if (
typeof type === 'object' &&
type !== null &&
type.$$typeof === REACT_LAZY_TYPE
) {
// We don't want to eagerly initialize the initializer in DEV mode so we can't
// call it to extract the type so we don't know the type of this component.
return '<...>';
}
try {
const name = getComponentNameFromType(type);
return name ? '<' + name + '>' : '<...>';
} catch (x) {
return '<...>';
}
}
function getOwner() {
if (__DEV__) {
const dispatcher = ReactSharedInternals.A;
if (dispatcher === null) {
return null;
}
return dispatcher.getOwner();
}
return null;
}
// ... (847 more lines)
Domain
Subdomains
Functions
- ReactElement()
- UnknownOwner()
- cloneAndReplaceKey()
- cloneElement()
- createElement()
- createFakeCallStack.react_stack_bottom_frame()
- createTask()
- defineKeyPropWarningGetter()
- elementRefGetterWithDeprecationWarning()
- getOwner()
- getTaskName()
- hasValidKey()
- hasValidRef()
- isLazyType()
- isValidElement()
- jsxDEV()
- jsxDEVImpl()
- jsxProd()
- jsxProdSignatureRunningInDevWithDynamicChildren()
- jsxProdSignatureRunningInDevWithStaticChildren()
- validateChildKeys()
Dependencies
- CheckStringCoercion
- ReactFeatureFlags
- ReactSharedInternals
- ReactSymbols
- assign
- getComponentNameFromType
- hasOwnProperty
- isArray
Imported By
- packages/react/src/ReactChildren.js
- packages/react/src/ReactClient.js
- packages/react/src/jsx/ReactJSX.js
- packages/react/src/jsx/ReactJSXServer.js
- packages/react/src/ReactServer.experimental.development.js
- packages/react/src/ReactServer.experimental.js
- packages/react/src/ReactServer.fb.js
- packages/react/src/ReactServer.js
Source
Frequently Asked Questions
What does ReactJSXElement.js do?
ReactJSXElement.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 ReactJSXElement.js?
ReactJSXElement.js defines 21 function(s): ReactElement, UnknownOwner, cloneAndReplaceKey, cloneElement, createElement, createFakeCallStack.react_stack_bottom_frame, createTask, defineKeyPropWarningGetter, elementRefGetterWithDeprecationWarning, getOwner, and 11 more.
What does ReactJSXElement.js depend on?
ReactJSXElement.js imports 8 module(s): CheckStringCoercion, ReactFeatureFlags, ReactSharedInternals, ReactSymbols, assign, getComponentNameFromType, hasOwnProperty, isArray.
What files import ReactJSXElement.js?
ReactJSXElement.js is imported by 8 file(s): ReactChildren.js, ReactClient.js, ReactJSX.js, ReactJSXServer.js, ReactServer.experimental.development.js, ReactServer.experimental.js, ReactServer.fb.js, ReactServer.js.
Where is ReactJSXElement.js in the architecture?
ReactJSXElement.js is located at packages/react/src/jsx/ReactJSXElement.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react/src/jsx).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free