numbbbbb / read-vue-source-code Goto Github PK
View Code? Open in Web Editor NEWRecord what I learn after reading Vue source code
Record what I learn after reading Vue source code
I've started translation at https://github.com/vvscode/tr--read-vue-source-code
If you're ready contribute to - welcome
I think it's easier to read in that way.
Do you have any tip how can I run all these flows in browser, using debugger?
I have tried cloning the vue project and import vue
, but no luck!
Why searching around I stumbled on the great repo, do you have any tip how can I do this?
Thanks
I would be glad to translate your notes and it would be perfect if you share code as code snippets, not as screenshots.
Thanks in advance
在 04-dynamic-data-observer-dep-and-watcher.md
中解释 Watcher
中的 get
时:
inside depend(), it calls Dep.target.addDep(this), here this is _data's dep, it's stored at vm._data.ob.dep
这里的 this
应该是 name: 'foo'
的,而不是 _data
的。
new Observer
时 dep
为 _data
的defineReactive
时 dep
为其中的 foo
如果我理解的有错误,请指正。
In 01-find-the-entry.md, 😄.
inside depend(), it calls Dep.target.addDep(this), here this refers to the dep property of object _data's observer, it's stored at vm._data.ob.dep
这里的说明有些疑惑,dep使用的都是闭包内的实例,没有使用__ob__.dep啊(只有数组才会用到__ob__.deb 吧,因为数组没有setter getter)
针对示例中的内容_data.name 这个是对象吧,不是数组,所以不存在存储到__ob__.dep的说法吧?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.