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

2019 Aug week4 #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

2019 Aug week4 #111

wants to merge 1 commit into from

Conversation

lgpeng233
Copy link
Contributor

No description provided.

Copy link
Owner

@iammapping iammapping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

貌似 object 类的返回值,每次都会触发一个浅对比,会成为一个性能杀手,而且对于一些深层次的依赖也会遗漏。使用 defineProperty 委托的方式是对的,但不应该只委托 function 的类型,把其他的也加进来用于标记依赖。有兴趣可以看下 vue 的 computed 原理以及 immer.js 的实现方式。

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.

2 participants