/** * 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 strict-local * @format * @oncall relay */ // This contextual profiler can be used to wrap a react sub-tree. It will bind // the RelayProfiler during the render phase of these components. Allows // collecting metrics for a specific part of your application. 'use strict'; const React = require('react'); export type ProfilerContextType = { wrapPrepareQueryResource: (cb: () => T) => T, ... }; const ProfilerContext: React.Context = React.createContext( { wrapPrepareQueryResource: (cb: () => T): T => { return cb(); }, }, ); module.exports = ProfilerContext;