-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大概的 react render 基本原理與問題處理 #8
Comments
pokemon-Gym/src/components/Hero/useHeroContext.jsx Lines 17 to 341 in 7b48004
|
https://www.youtube.com/watch?v=NsFmOttIW9Y&ab_channel=JackHerrington Jack 的這隻影片用很實際但又直觀的方式來看 re-render 的影響 (雖然我從來不記得他叫 Jack) 一些我覺得你多花點力氣也要看完(或看懂)的:
剛好之前有問到為什麼、什麼時候要導入 global state management library,6:41 以簡單又實際的範例演示如何使用 zustand 解決。當然,每個人遇到的狀況不一樣,不見得每每都要做效能最佳化,但把概念學起來,需要優化時我們才比較有解決方向 |
什麼時候會 re-render
如何避免 re-render
React.memo
要做什麼
HeroProvider
拆解成多個 Provider 各司其職The text was updated successfully, but these errors were encountered: