Home / File/ TimelineNotSupported.js — react Source File

TimelineNotSupported.js — react Source File

Architecture documentation for TimelineNotSupported.js, a javascript file in the react codebase. 3 imports, 1 dependents.

File javascript BabelCompiler Validation 3 imports 1 dependents 3 functions

Entity Profile

Dependency Diagram

graph LR
  af2d2803_cefc_34b0_cb09_2b822b422527["TimelineNotSupported.js"]
  853fc6c0_16aa_cd01_730a_2c85f03951ed["TimelineNotSupported.css"]
  af2d2803_cefc_34b0_cb09_2b822b422527 --> 853fc6c0_16aa_cd01_730a_2c85f03951ed
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  af2d2803_cefc_34b0_cb09_2b822b422527 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  ae1017d8_c18a_3ecd_18f4_bf7a64bbd91a["react-devtools-feature-flags"]
  af2d2803_cefc_34b0_cb09_2b822b422527 --> ae1017d8_c18a_3ecd_18f4_bf7a64bbd91a
  7fd04d1f_8e14_be78_275b_49d4237a927b["Timeline.js"]
  7fd04d1f_8e14_be78_275b_49d4237a927b --> af2d2803_cefc_34b0_cb09_2b822b422527
  style af2d2803_cefc_34b0_cb09_2b822b422527 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 {isInternalFacebookBuild} from 'react-devtools-feature-flags';

import styles from './TimelineNotSupported.css';

type Props = {
  isPerformanceTracksSupported: boolean,
};

function PerformanceTracksSupported() {
  return (
    <>
      <p className={styles.Paragraph}>
        <span>
          Please use{' '}
          <a
            className={styles.Link}
            href="https://react.dev/reference/dev-tools/react-performance-tracks"
            rel="noopener noreferrer"
            target="_blank">
            React Performance tracks
          </a>{' '}
          instead of the Timeline profiler.
        </span>
      </p>
    </>
  );
}

function UnknownUnsupportedReason() {
  return (
    <>
      <p className={styles.Paragraph}>
        Timeline profiler requires a development or profiling build of{' '}
        <code className={styles.Code}>react-dom@{'>='}18</code>.
      </p>
      <p className={styles.Paragraph}>
        In React 19.2 and above{' '}
        <a
          className={styles.Link}
          href="https://react.dev/reference/dev-tools/react-performance-tracks"
          rel="noopener noreferrer"
          target="_blank">
          React Performance tracks
        </a>{' '}
        can be used instead.
      </p>
      <div className={styles.LearnMoreRow}>
        Click{' '}
        <a
          className={styles.Link}
          href="https://fb.me/react-devtools-profiling"
          rel="noopener noreferrer"
          target="_blank">
          here
        </a>{' '}
        to learn more about profiling.
      </div>
    </>
  );
}

export default function TimelineNotSupported({
  isPerformanceTracksSupported,
}: Props): React.Node {
  return (
    <div className={styles.Column}>
      <div className={styles.Header}>Timeline profiling not supported.</div>

      {isPerformanceTracksSupported ? (
        <PerformanceTracksSupported />
      ) : (
        <UnknownUnsupportedReason />
      )}

      {isInternalFacebookBuild && (
        <div className={styles.MetaGKRow}>
          <strong>Meta only</strong>: Enable the{' '}
          <a
            className={styles.Link}
            href="https://fburl.com/react-devtools-scheduling-profiler-gk"
            rel="noopener noreferrer"
            target="_blank">
            react_enable_scheduling_profiler GK
          </a>
          .
        </div>
      )}
    </div>
  );
}

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does TimelineNotSupported.js do?
TimelineNotSupported.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 TimelineNotSupported.js?
TimelineNotSupported.js defines 3 function(s): PerformanceTracksSupported, TimelineNotSupported, UnknownUnsupportedReason.
What does TimelineNotSupported.js depend on?
TimelineNotSupported.js imports 3 module(s): TimelineNotSupported.css, react, react-devtools-feature-flags.
What files import TimelineNotSupported.js?
TimelineNotSupported.js is imported by 1 file(s): Timeline.js.
Where is TimelineNotSupported.js in the architecture?
TimelineNotSupported.js is located at packages/react-devtools-timeline/src/TimelineNotSupported.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-timeline/src).

Analyze Your Own Codebase

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

Try Supermodel Free