Skip to content

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