index.js — react Source File
Architecture documentation for index.js, a javascript file in the react codebase. 2 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR c2796300_576b_e429_f52a_5d5f328cb93f["index.js"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] c2796300_576b_e429_f52a_5d5f328cb93f --> ac587885_e294_a1e9_b13f_5e7b920fdb42 39839a23_0e6f_3300_7134_03c503e439b3["react-native-web"] c2796300_576b_e429_f52a_5d5f328cb93f --> 39839a23_0e6f_3300_7134_03c503e439b3 30d76895_4832_9ca3_9e81_e0cdf028c09c["index.js"] 30d76895_4832_9ca3_9e81_e0cdf028c09c --> c2796300_576b_e429_f52a_5d5f328cb93f style c2796300_576b_e429_f52a_5d5f328cb93f 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 {Fragment, useState} from 'react';
import {Button, Text, View} from 'react-native-web';
export default function ReactNativeWeb(): React.Node {
const [backgroundColor, setBackgroundColor] = useState('purple');
const toggleColor = () =>
setBackgroundColor(backgroundColor === 'purple' ? 'green' : 'purple');
return (
<Fragment>
<h1>ReactNativeWeb</h1>
<View>
<Text>auto (default) - english LTR</Text>
<Text>
{
'\u0623\u062D\u0628 \u0627\u0644\u0644\u063A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 auto (default) - arabic RTL'
}
</Text>
<Text style={{textAlign: 'left'}}>
left left left left left left left left left left left left left left
left
</Text>
<Button
color={backgroundColor}
onPress={toggleColor}
title={`Switch background color to "${
backgroundColor === 'purple' ? 'green' : 'purple'
}"`}
/>
</View>
</Fragment>
);
}
Domain
Subdomains
Functions
Dependencies
- react
- react-native-web
Imported By
Source
Frequently Asked Questions
What does index.js do?
index.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 index.js?
index.js defines 1 function(s): ReactNativeWeb.
What does index.js depend on?
index.js imports 2 module(s): react, react-native-web.
What files import index.js?
index.js is imported by 1 file(s): index.js.
Where is index.js in the architecture?
index.js is located at packages/react-devtools-shell/src/app/ReactNativeWeb/index.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shell/src/app/ReactNativeWeb).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free