ActivityList.js — react Source File
Architecture documentation for ActivityList.js, a javascript file in the react codebase. 8 imports, 4 dependents.
Entity Profile
Dependency Diagram
graph LR e1645ed6_a62a_153d_27fd_691e1a53cb4f["ActivityList.js"] a6974d4b_00f2_ea7b_57f6_7cba24980c09["ActivityList.css"] e1645ed6_a62a_153d_27fd_691e1a53cb4f --> a6974d4b_00f2_ea7b_57f6_7cba24980c09 2d59b0f9_9ad6_da4d_0264_d98f193ab3fd["TreeContext.js"] e1645ed6_a62a_153d_27fd_691e1a53cb4f --> 2d59b0f9_9ad6_da4d_0264_d98f193ab3fd 315baf50_1028_51ca_a9c1_679c6a17ed98["hooks.js"] e1645ed6_a62a_153d_27fd_691e1a53cb4f --> 315baf50_1028_51ca_a9c1_679c6a17ed98 913bb343_55ea_f1b8_08f5_b75cb0a92b76["context.js"] e1645ed6_a62a_153d_27fd_691e1a53cb4f --> 913bb343_55ea_f1b8_08f5_b75cb0a92b76 aec7978f_0a19_ba93_de9e_ac8cf5ddc74b["types"] e1645ed6_a62a_153d_27fd_691e1a53cb4f --> aec7978f_0a19_ba93_de9e_ac8cf5ddc74b ebb48597_9981_bb7d_08db_b9fe29a0f62e["SyntheticEvent"] e1645ed6_a62a_153d_27fd_691e1a53cb4f --> ebb48597_9981_bb7d_08db_b9fe29a0f62e baf70b0e_4867_b3ed_962a_e5c9ae820fef["store"] e1645ed6_a62a_153d_27fd_691e1a53cb4f --> baf70b0e_4867_b3ed_962a_e5c9ae820fef ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] e1645ed6_a62a_153d_27fd_691e1a53cb4f --> ac587885_e294_a1e9_b13f_5e7b920fdb42 3bbe1444_b210_8ba4_4493_8fd51690fd1d["ActivitySlice.js"] 3bbe1444_b210_8ba4_4493_8fd51690fd1d --> e1645ed6_a62a_153d_27fd_691e1a53cb4f 9930e8cf_03b4_86c0_be04_47b410246b71["Element.js"] 9930e8cf_03b4_86c0_be04_47b410246b71 --> e1645ed6_a62a_153d_27fd_691e1a53cb4f 80ad5569_a221_98e5_daec_ede1bea33ee0["Tree.js"] 80ad5569_a221_98e5_daec_ede1bea33ee0 --> e1645ed6_a62a_153d_27fd_691e1a53cb4f 3249b7c1_ae10_2672_10ce_a66fd0ee6f60["SuspenseTab.js"] 3249b7c1_ae10_2672_10ce_a66fd0ee6f60 --> e1645ed6_a62a_153d_27fd_691e1a53cb4f style e1645ed6_a62a_153d_27fd_691e1a53cb4f 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 type {
Element,
ActivitySliceFilter,
ComponentFilter,
} from 'react-devtools-shared/src/frontend/types';
import typeof {
SyntheticMouseEvent,
SyntheticKeyboardEvent,
} from 'react-dom-bindings/src/events/SyntheticEvent';
import type Store from 'react-devtools-shared/src/devtools/store';
import * as React from 'react';
import {useContext, useMemo, useTransition} from 'react';
import {
ComponentFilterActivitySlice,
ElementTypeActivity,
} from 'react-devtools-shared/src/frontend/types';
import styles from './ActivityList.css';
import {
TreeStateContext,
TreeDispatcherContext,
} from '../Components/TreeContext';
import {useHighlightHostInstance} from '../hooks';
import {StoreContext} from '../context';
export function useChangeActivitySliceAction(): (
id: Element['id'] | null,
) => void {
const store = useContext(StoreContext);
function changeActivitySliceAction(activityID: Element['id'] | null) {
const nextFilters: ComponentFilter[] = [];
// Remove any existing activity slice filter
for (let i = 0; i < store.componentFilters.length; i++) {
const filter = store.componentFilters[i];
if (filter.type !== ComponentFilterActivitySlice) {
nextFilters.push(filter);
}
}
if (activityID !== null) {
const rendererID = store.getRendererIDForElement(activityID);
if (rendererID === null) {
throw new Error('Expected to find renderer.');
}
const activityFilter: ActivitySliceFilter = {
type: ComponentFilterActivitySlice,
activityID,
rendererID,
isValid: true,
isEnabled: true,
};
// ... (204 more lines)
Domain
Subdomains
Dependencies
- ActivityList.css
- SyntheticEvent
- TreeContext.js
- context.js
- hooks.js
- react
- store
- types
Imported By
Source
Frequently Asked Questions
What does ActivityList.js do?
ActivityList.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 ActivityList.js?
ActivityList.js defines 2 function(s): ActivityList, useChangeActivitySliceAction.
What does ActivityList.js depend on?
ActivityList.js imports 8 module(s): ActivityList.css, SyntheticEvent, TreeContext.js, context.js, hooks.js, react, store, types.
What files import ActivityList.js?
ActivityList.js is imported by 4 file(s): ActivitySlice.js, Element.js, SuspenseTab.js, Tree.js.
Where is ActivityList.js in the architecture?
ActivityList.js is located at packages/react-devtools-shared/src/devtools/views/SuspenseTab/ActivityList.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shared/src/devtools/views/SuspenseTab).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free