Skip to content

Instantly share code, notes, and snippets.

@marekpiechut
Created June 22, 2021 10:52
Show Gist options
  • Select an option

  • Save marekpiechut/1634e779ac9582b240711757613a53b4 to your computer and use it in GitHub Desktop.

Select an option

Save marekpiechut/1634e779ac9582b240711757613a53b4 to your computer and use it in GitHub Desktop.
React-profiler
import {
unstable_trace as trace,
} from 'scheduler/tracing'
<input
type="text"
value={name}
onChange={e => {
trace('Enter user name', performance.now(), () =>
onChange(e.target.value)
)
}}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment