mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49402 ## Motivation Modernising the RN codebase to allow for modern Flow tooling to process it. ## This diff - Migrates `Utilities/dismissKeyboard.js`, `Utilities/GlobalPerformanceLogger.js` and `Utilities/SceneTracker.js` to use the export syntax. - Updates deep-imports of these files to use `.default` - Updates jest mocks - Updates the current iteration of API snapshots (intended). Changelog: [General][Breaking] - Deep imports to `Utilities/dismissKeyboard.js`, `Utilities/GlobalPerformanceLogger.js` or `Utilities/SceneTracker.js` with `require` syntax need to be appended with '.default'. Reviewed By: huntie Differential Revision: D69599636 fbshipit-source-id: 0c450996f908d8139dd0c48677f58e07243d6150
25 lines
822 B
JavaScript
25 lines
822 B
JavaScript
/**
|
|
* 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
|
|
* @format
|
|
*/
|
|
|
|
import type {IPerformanceLogger} from './createPerformanceLogger';
|
|
|
|
import createPerformanceLogger from './createPerformanceLogger';
|
|
|
|
/**
|
|
* This is a global shared instance of IPerformanceLogger that is created with
|
|
* createPerformanceLogger().
|
|
* This logger should be used only for global performance metrics like the ones
|
|
* that are logged during loading bundle. If you want to log something from your
|
|
* React component you should use PerformanceLoggerContext instead.
|
|
*/
|
|
const GlobalPerformanceLogger: IPerformanceLogger = createPerformanceLogger();
|
|
|
|
export default GlobalPerformanceLogger;
|