Skip to main content
This is documentation for React Native 0.82, which is no longer in active development.
For up-to-date documentation, see the latest version (0.83).
Version: 0.82

PerformanceObserver πŸ§ͺ

Canary πŸ§ͺ

This API is currently only available in React Native’s Canary and Experimental channels.

If you want to try it out, please enable the Canary Channel in your app.

The global PerformanceObserver class, as defined in Web specifications.

Example​

ts
const observer =newPerformanceObserver(
(list, observer, options)=>{
for(const entry of list.getEntries()){
console.log(
'Received entry with type',
entry.entryType,
'and name',
entry.name,
'that started at',
entry.startTime,
'and took',
entry.duration,
'ms',
);
}
},
);

observer.observe({entryTypes:['mark','measure']});

Reference

Constructor​

PerformanceObserver()​

See documentation in MDN.

Static properties​

supportedEntryTypes​

See documentation in MDN.

Returns ['mark', 'measure', 'event', 'longtask'].

Instance methods​

observe()​

See documentation in MDN.

disconnect()​

See documentation in MDN.

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /