Skip to content

Commit c7bef93

Browse files
rubennortefacebook-github-bot
authored andcommittedJan 31, 2024·
Rename performance.reactNativeStartupTiming as performance.rnStartupTiming (#42762)
Summary: Pull Request resolved: #42762 This renames `performance.reactNativeStartupTiming` as `performance.rnStartupTiming` to align with the recommended vendor prefix for React Native. This API is still private, so it's safe to rename. Changelog: [internal] Reviewed By: javache Differential Revision: D53264515 fbshipit-source-id: 6e7a222901071594cac0ca8a0ac78e56e60ab132
1 parent 37cb84d commit c7bef93

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed
 

‎packages/react-native/Libraries/WebPerformance/Performance.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export default class Performance {
141141
}
142142

143143
// Startup metrics is not used in web, but only in React Native.
144-
get reactNativeStartupTiming(): ReactNativeStartupTiming {
144+
get rnStartupTiming(): ReactNativeStartupTiming {
145145
if (NativePerformance?.getReactNativeStartupTiming) {
146146
const {
147147
startTime,

‎packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -8976,7 +8976,7 @@ declare export class PerformanceMeasure extends PerformanceEntry {
89768976
declare export default class Performance {
89778977
eventCounts: EventCounts;
89788978
get memory(): MemoryInfo;
8979-
get reactNativeStartupTiming(): ReactNativeStartupTiming;
8979+
get rnStartupTiming(): ReactNativeStartupTiming;
89808980
mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
89818981
clearMarks(markName?: string): void;
89828982
measure(

‎packages/rn-tester/js/examples/Performance/PerformanceApiExample.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ function MemoryExample(): React.Node {
2727
const onGetMemoryInfo = useCallback(() => {
2828
// performance.memory is not included in bom.js yet.
2929
// Once we release the change in flow this can be removed.
30-
// $FlowFixMe[prop-missing]
31-
// $FlowFixMe[incompatible-call]
3230
setMemoryInfo(performance.memory);
3331
}, []);
3432
return (
@@ -58,9 +56,7 @@ function StartupTimingExample(): React.Node {
5856
const onGetStartupTiming = useCallback(() => {
5957
// performance.reactNativeStartupTiming is not included in bom.js yet.
6058
// Once we release the change in flow this can be removed.
61-
// $FlowFixMe[prop-missing]
62-
// $FlowFixMe[incompatible-call]
63-
setStartUpTiming(performance.reactNativeStartupTiming);
59+
setStartUpTiming(performance.rnStartupTiming);
6460
}, []);
6561
return (
6662
<RNTesterPage noScroll={true} title="performance.reactNativeStartupTiming">

0 commit comments

Comments
 (0)
Please sign in to comment.