Skip to content

Instantly share code, notes, and snippets.

@marekpiechut
Created June 22, 2021 10:53
Show Gist options
  • Save marekpiechut/f8595289d3f41802077f20d170cc0c33 to your computer and use it in GitHub Desktop.
Save marekpiechut/f8595289d3f41802077f20d170cc0c33 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