Files
react/packages/react-devtools-shared/src/devtools/views/Components/ViewSourceContext.js
T
Blake FriedmanandGitHub 51b6878ee9 [DevTools] front-end for profiling event stack (#24805)
* [DevTools] front-end for profiling event stack

Adds a side-bar to the profiling tab. Users can now select an update event, and are
shown the callstack from the originating component. When a source path is available
there is now UI to jump to source.

Add FB enabled feature flag: enableProfilerComponentTree for the side-bar.

resolves #24170
2022-06-28 22:15:24 +01:00

22 lines
569 B
JavaScript

/**
* Copyright (c) Facebook, Inc. and its 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 {createContext} from 'react';
import type {ViewSourceLine} from 'react-devtools-shared/src/devtools/views/DevTools';
export type Context = {|
viewSourceLineFunction: ViewSourceLine | null,
|};
const ViewSourceContext = createContext<Context>(((null: any): Context));
ViewSourceContext.displayName = 'ViewSourceContext';
export default ViewSourceContext;