Created
June 22, 2021 10:53
-
-
Save marekpiechut/6b177c700b46f2e99be11096fc1e113b to your computer and use it in GitHub Desktop.
React-profiler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const App = () => { | |
const loadData = id => ({ id, value: 'some' }) | |
const [_, setDummy] = useState() | |
return ( | |
<div className="App"> | |
<button onClick={() => setDummy(Date.now())}>Render</button> | |
<SlowComponent onClick={() => loadData('dummy')} /> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment