ForgetBadge.js — react Source File
Architecture documentation for ForgetBadge.js, a javascript file in the react codebase. 7 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3["ForgetBadge.js"] 756a0539_706c_4343_7c04_e05126473386["Badge.js"] 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3 --> 756a0539_706c_4343_7c04_e05126473386 499262a9_8ff7_54b8_b4bd_df5d9dabe69c["Badge"] 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3 --> 499262a9_8ff7_54b8_b4bd_df5d9dabe69c 9e753c35_ccc6_2061_a942_6e9b10c9177c["IndexableDisplayName.js"] 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3 --> 9e753c35_ccc6_2061_a942_6e9b10c9177c 944cc9b2_cf30_ba1e_496b_02b48a5aaa97["IndexableDisplayName"] 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3 --> 944cc9b2_cf30_ba1e_496b_02b48a5aaa97 bb73063d_5d08_efb3_036e_72b78842d689["tooltip.js"] 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3 --> bb73063d_5d08_efb3_036e_72b78842d689 8ca330a7_bae6_3799_6d8a_7d714ba604ae["ForgetBadge.css"] 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3 --> 8ca330a7_bae6_3799_6d8a_7d714ba604ae ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 25e89372_6558_2e4a_04f5_2e343e42cde5["ElementBadges.js"] 25e89372_6558_2e4a_04f5_2e343e42cde5 --> 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3 0c2aa36f_2bfd_0e20_42bf_2839b3e43e73["IndexableElementBadges.js"] 0c2aa36f_2bfd_0e20_42bf_2839b3e43e73 --> 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3 d5989364_e16c_e349_6082_7c3e50da7772["InspectedElementBadges.js"] d5989364_e16c_e349_6082_7c3e50da7772 --> 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3 style 7f77861c_2ca5_7fd9_4b5c_fa236449c0d3 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.
*
* @flow
*/
import * as React from 'react';
import Badge from './Badge';
import IndexableDisplayName from './IndexableDisplayName';
import Tooltip from './reach-ui/tooltip';
import styles from './ForgetBadge.css';
type CommonProps = {
className?: string,
};
type PropsForIndexable = CommonProps & {
indexable: true,
elementID: number,
};
type PropsForNonIndexable = CommonProps & {
indexable: false | void,
elementID?: number,
};
type Props = PropsForIndexable | PropsForNonIndexable;
export default function ForgetBadge(props: Props): React.Node {
const {className = ''} = props;
const innerView = props.indexable ? (
<IndexableDisplayName displayName="Memo" id={props.elementID} />
) : (
'Memo'
);
const title =
'✨ This component has been auto-memoized by the React Compiler.';
return (
<Tooltip label={title}>
<Badge className={`${styles.Root} ${className}`}>{innerView}</Badge>
</Tooltip>
);
}
Domain
Subdomains
Functions
Imported By
Source
Frequently Asked Questions
What does ForgetBadge.js do?
ForgetBadge.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 ForgetBadge.js?
ForgetBadge.js defines 1 function(s): ForgetBadge.
What does ForgetBadge.js depend on?
ForgetBadge.js imports 7 module(s): Badge, Badge.js, ForgetBadge.css, IndexableDisplayName, IndexableDisplayName.js, react, tooltip.js.
What files import ForgetBadge.js?
ForgetBadge.js is imported by 3 file(s): ElementBadges.js, IndexableElementBadges.js, InspectedElementBadges.js.
Where is ForgetBadge.js in the architecture?
ForgetBadge.js is located at packages/react-devtools-shared/src/devtools/views/Components/ForgetBadge.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shared/src/devtools/views/Components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free