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

依赖收集里的这行代码是什么意思?怎么感觉缺东西 #71

Open
horseson2018 opened this issue Jun 29, 2020 · 4 comments

Comments

@horseson2018
Copy link

class Vue {
    constructor(options) {
        this._data = options.data;
        observer(this._data, options.render);
        let watcher = new Watcher(this, ); // 这括号里是没写完吗
    }
}
@yilujun100
Copy link

这里应该是实例化一个渲染watcher,在watcher里面会执行updateComponent回调

@cute1baby
Copy link

我也觉得依赖收集这里代码不完整,还有Dep.target=null的执行位置是不是不对?

@topul
Copy link

topul commented Mar 12, 2021

这里应该也是要传一个options.render吧

new Watcher(this, null, options.render)

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

5 participants
@yilujun100 @topul @cute1baby @horseson2018 and others