mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
* [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
22 lines
569 B
JavaScript
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;
|