You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for a way to clear (i.e. cancel) a performance marker. My use case is that I don't want to log a timing event if what I'm measuring is interrupted (or fails). Here's a simple example using React:
classMyComponentextendsReact.Component{constructor(){perfume.start('MeasureMyComponent');}componentDidMount(){loadData().then(()=>{perfume.end('MeasureMyComponent');}).catch(err=>{// ... clear the marker if there's an error});}componentWillUnmount(){// ... clear the marker if the component unmounts before loadData() is done}}
Is there a way to do this with perfume.js? I haven't been able to find it in the docs or source code, but maybe I'm missing something.
The text was updated successfully, but these errors were encountered:
Thanks for the great library!
I'm looking for a way to clear (i.e. cancel) a performance marker. My use case is that I don't want to log a timing event if what I'm measuring is interrupted (or fails). Here's a simple example using React:
Is there a way to do this with perfume.js? I haven't been able to find it in the docs or source code, but maybe I'm missing something.
The text was updated successfully, but these errors were encountered: