Skip to content
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

refactor: usePrevious #1065

Merged
merged 2 commits into from
Jul 28, 2021
Merged

refactor: usePrevious #1065

merged 2 commits into from
Jul 28, 2021

Conversation

brickspert
Copy link
Collaborator

No description provided.

@brickspert brickspert requested review from awmleer and ttys026 July 26, 2021 11:22
@brickspert
Copy link
Collaborator Author

fix: #918 #780

@brickspert brickspert merged commit 9e4e1b4 into next Jul 28, 2021
@brickspert brickspert deleted the refactor/use-previous branch July 28, 2021 03:14
@andyyxw
Copy link

andyyxw commented Aug 7, 2021

@brickspert 怎么不按照 之前 的方案,再把shouldUpdate(curRef.current, state)){}塞到useEffect()中去呢,避免了shouldUpdate重复执行。
或者用useMemo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants