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

chore: use useMemo to cache result #439

Merged
merged 1 commit into from Dec 24, 2019
Merged

chore: use useMemo to cache result #439

merged 1 commit into from Dec 24, 2019

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Dec 24, 2019

React.Memo 使得自定义 OptionList 如果使用了 useEffect(open) 会永远获得 true。抽离出来让自定义 OptionList 组件自行管理。

ref ant-design/ant-design#20366

@vercel
Copy link

vercel bot commented Dec 24, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/react-component/select/eq6w8hymb
🌍 Preview: https://select-git-use-memo.react-component.now.sh

@zombieJ zombieJ merged commit cc728f3 into master Dec 24, 2019
@delete-merged-branch delete-merged-branch bot deleted the use-memo branch December 24, 2019 06:43
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.

None yet

1 participant