mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove JSEventLoopWatchdog from react-native package (#51614)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51614 `JSEventLoopWatchdog` is not used in react-native package. This diff moves it to rn-tester which previously deep imported it from react-native (which we want to avoid). Changelog: [Internal] Reviewed By: huntie Differential Revision: D75410548 fbshipit-source-id: d4996742578e3b068e7acad9479394388b1907ac
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b34e56259a
commit
9cdd0db138
@@ -4722,22 +4722,6 @@ declare export default typeof InteractionManagerStub;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Interaction/JSEventLoopWatchdog.js 1`] = `
|
||||
"type Handler = {
|
||||
onIterate?: () => void,
|
||||
onStall: (params: { lastInterval: number, busyTime: number, ... }) => ?string,
|
||||
...
|
||||
};
|
||||
declare const JSEventLoopWatchdog: {
|
||||
getStats: () => Object,
|
||||
reset: () => void,
|
||||
addHandler: (handler: Handler) => void,
|
||||
install: ($$PARAM_0$$: { thresholdMS: number, ... }) => void,
|
||||
};
|
||||
declare export default typeof JSEventLoopWatchdog;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Interaction/NativeFrameRateLogger.js 1`] = `
|
||||
"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeFrameRateLogger\\";
|
||||
declare export default typeof NativeFrameRateLogger;
|
||||
|
||||
@@ -56,8 +56,7 @@ const useJsStalls = (): ({
|
||||
}, []);
|
||||
|
||||
const onEnableJsStallsTracking = useCallback(() => {
|
||||
const JSEventLoopWatchdog =
|
||||
require('react-native/Libraries/Interaction/JSEventLoopWatchdog').default;
|
||||
const JSEventLoopWatchdog = require('./JSEventLoopWatchdog').default;
|
||||
|
||||
JSEventLoopWatchdog.install({thresholdMS: 25});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user