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

避免rerender 的一些方法 #38

Open
ZWkang opened this issue Aug 17, 2019 · 0 comments
Open

避免rerender 的一些方法 #38

ZWkang opened this issue Aug 17, 2019 · 0 comments

Comments

@ZWkang
Copy link
Owner

ZWkang commented Aug 17, 2019

此篇主要是使用context api一些避免无谓re-render的场景

demo 汇总

详细描述

因为provide创建的时候 比对Children 每一次创建的provide的Children 必然不相等。

应该将Provide拿出来,然后对Provide进行props.children调用。这样以来,组件create的children

就可以进行差异性比较了。

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

No branches or pull requests

1 participant