forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
React Native raw event EventEmitter - intended for app-specific perf …
…listeners and debugging (facebook#23232) * RawEventEmitter: new event perf profiling mechanism outside of Pressability to capture all touch events, and other event types * sync * concise notation * Move event telemetry event emitter call from Plugin to ReactFabricEventEmitter, to reduce reliance on the plugin system and move the emit call further into the core * Backout changes to ReactNativeEventPluginOrder * Properly flow typing event emitter, and emit event to two channels: named and catchall * fix typing for event name string * fix typing for event name string * fix flow * Add more comments about how the event telemetry system works * Add more comments about how the event telemetry system works * rename to RawEventTelemetryEventEmitterOffByDefault * yarn prettier-all * rename event * comments * improve flow types * renamed file
- Loading branch information
1 parent
38d33f5
commit 6af8570
Showing
4 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...eact-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/RawEventEmitter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* 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. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// See the react-native repository for a full implementation. | ||
// However, this is just an EventEmitter. | ||
const RawEventEmitter = { | ||
emit: jest.fn(), | ||
}; | ||
|
||
module.exports = {default: RawEventEmitter}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters