diff --git a/README.md b/README.md
index 651c5e2a3a..a31079d61d 100644
--- a/README.md
+++ b/README.md
@@ -59,8 +59,8 @@ Russian translation is maintained by Translation Gang.
### Want to help with the translation?
-If you feel okay with translating sorta alone, just fork the repo, create a "work-in-progress" issue to inform others that you're doing the translation, and just go on.
+If you feel okay with translating sorta alone, you can fork the repo, create a "work-in-progress" issue to inform others that you're doing the translation, and go for it.
-If you are more of a team player, maybe Translation Gang is for you? Then just let us know somehow that you're ready to join this international open-source translators community. Feel free to contact [Grigoriy Beziuk](https://gbezyuk.github.io) or anybody else from [the team](https://github.com/orgs/translation-gang/people).
+If you are more of a team player, Translation Gang might be for you. Let us know somehow that you're ready to join this international open-source translators community. Feel free to contact [Grigoriy Beziuk](https://gbezyuk.github.io) or anybody else from [the team](https://github.com/orgs/translation-gang/people).
And thank you in advance ;)
diff --git a/src/_posts/common-gotchas.md b/src/_posts/common-gotchas.md
index 2074cc7439..a8abf2314e 100644
--- a/src/_posts/common-gotchas.md
+++ b/src/_posts/common-gotchas.md
@@ -13,7 +13,7 @@ Most of the time, when you change a Vue instance's data, the view updates. But t
1. When you are **adding a new property** that wasn't present when the data was observed. Due to the limitation of ES5 and to ensure consistent behavior across browsers, Vue.js cannot detect property addition/deletions. The best practice is to always declare properties that need to be reactive upfront. In cases where you absolutely need to add or delete properties at runtime, use the global [`Vue.set`](/api/#Vue-set) or [`Vue.delete`](/api/#Vue-delete) methods.
-2. When you modify an Array by directly setting an index (e.g. `arr[0] = val`) or modifying its `length` property. Similarly, Vue.js cannot pickup these changes. Always modify arrays by using an Array instance method, or replacing it entirely. Vue provides a convenience method `arr.$set(index, value)` which is just syntax sugar for `arr.splice(index, 1, value)`.
+2. When you modify an Array by directly setting an index (e.g. `arr[0] = val`) or modifying its `length` property. Similarly, Vue.js cannot pickup these changes. Always modify arrays by using an Array instance method, or replacing it entirely. Vue provides a convenience method `arr.$set(index, value)` which is syntax sugar for `arr.splice(index, 1, value)`.
Further reading: [Reactivity in Depth](/guide/reactivity.html) and [Array Change Detection](http://vuejs.org/guide/list.html#Array-Change-Detection).
@@ -25,7 +25,7 @@ Further reading: [Async Update Queue](/guide/reactivity.html#Async-Update-Queue)
### Why does `data` need to be a function?
-In the basic examples, we declare the `data` directly as a plain object. This is because we are creating only a single instance with `new Vue()`. However, when defining a **component**, `data` must be declared as a function that returns the initial data object. Why? Because there will be many instances created using the same definition. If we still use a plain object for `data`, that same object will be **shared by reference** across all instance created! By providing a `data` function, every time a new instance is created, we can simply call it to return a fresh copy of the initial data.
+In the basic examples, we declare the `data` directly as a plain object. This is because we are creating only a single instance with `new Vue()`. However, when defining a **component**, `data` must be declared as a function that returns the initial data object. Why? Because there will be many instances created using the same definition. If we still use a plain object for `data`, that same object will be **shared by reference** across all instance created! By providing a `data` function, every time a new instance is created we can call it to return a fresh copy of the initial data.
Further reading: [Component Option Caveats](/guide/components.html#Component-Option-Caveats).
diff --git a/src/v2/api/index.md b/src/v2/api/index.md
index a46db09fcd..7f7dd24e21 100644
--- a/src/v2/api/index.md
+++ b/src/v2/api/index.md
@@ -286,7 +286,7 @@ type: api
unbind: function () {}
})
- // register (simple function directive)
+ // register (function directive)
Vue.directive('my-directive', function () {
// this will be called as `bind` and `update`
})
@@ -415,7 +415,7 @@ type: api
- **Details:**
- The data object for the Vue instance. Vue will recursively convert its properties into getter/setters to make it "reactive". **The object must be plain**: native objects such as browser API objects and prototype properties are ignored. A rule of thumb is that data should just be data - it is not recommended to observe objects with its own stateful behavior.
+ The data object for the Vue instance. Vue will recursively convert its properties into getter/setters to make it "reactive". **The object must be plain**: native objects such as browser API objects and prototype properties are ignored. A rule of thumb is that data should just be data - it is not recommended to observe objects with their own stateful behavior.
Once observed, you can no longer add reactive properties to the root data object. It is therefore recommended to declare all root-level reactive properties upfront, before creating the instance.
@@ -423,7 +423,7 @@ type: api
Properties that start with `_` or `$` will **not** be proxied on the Vue instance because they may conflict with Vue's internal properties and API methods. You will have to access them as `vm.$data._property`.
- When defining a **component**, `data` must be declared as a function that returns the initial data object, because there will be many instances created using the same definition. If we still use a plain object for `data`, that same object will be **shared by reference** across all instances created! By providing a `data` function, every time a new instance is created, we can simply call it to return a fresh copy of the initial data.
+ When defining a **component**, `data` must be declared as a function that returns the initial data object, because there will be many instances created using the same definition. If we use a plain object for `data`, that same object will be **shared by reference** across all instances created! By providing a `data` function, every time a new instance is created we can call it to return a fresh copy of the initial data.
If required, a deep clone of the original object can be obtained by passing `vm.$data` through `JSON.parse(JSON.stringify(...))`.
@@ -457,7 +457,7 @@ type: api
- **Details:**
- A list/hash of attributes that are exposed to accept data from the parent component. It has a simple Array-based syntax and an alternative Object-based syntax that allows advanced configurations such as type checking, custom validation and default values.
+ A list/hash of attributes that are exposed to accept data from the parent component. It has an Array-based simple syntax and an alternative Object-based syntax that allows advanced configurations such as type checking, custom validation and default values.
- **Example:**
@@ -470,7 +470,7 @@ type: api
// object syntax with validation
Vue.component('props-demo-advanced', {
props: {
- // just type check
+ // type check
height: Number,
// type check plus other validations
age: {
@@ -530,7 +530,7 @@ type: api
var vm = new Vue({
data: { a: 1 },
computed: {
- // get only, just need a function
+ // get only
aDouble: function () {
return this.a * 2
},
@@ -710,7 +710,7 @@ type: api
- **Details:**
- Called synchronously after the instance has just been initialized, before data observation and event/watcher setup.
+ Called synchronously immediately after the instance has been initialized, before data observation and event/watcher setup.
- **See also:** [Lifecycle Diagram](../guide/instance.html#Lifecycle-Diagram)
@@ -742,7 +742,7 @@ type: api
- **Details:**
- Called after the instance has just been mounted where `el` is replaced by the newly created `vm.$el`. If the root instance is mounted to an in-document element, `vm.$el` will also be in-document when `mounted` is called.
+ Called after the instance has been mounted, where `el` is replaced by the newly created `vm.$el`. If the root instance is mounted to an in-document element, `vm.$el` will also be in-document when `mounted` is called.
Note that `mounted` does **not** guarantee that all child components have also been mounted. If you want to wait until the entire view has been rendered, you can use [vm.$nextTick](#vm-nextTick) inside of `mounted`:
@@ -900,7 +900,7 @@ type: api
- **Details:**
- The `mixins` option accepts an array of mixin objects. These mixin objects can contain instance options just like normal instance objects, and they will be merged against the eventual options using the same option merging logic in `Vue.extend()`. e.g. If your mixin contains a created hook and the component itself also has one, both functions will be called.
+ The `mixins` option accepts an array of mixin objects. These mixin objects can contain instance options like normal instance objects, and they will be merged against the eventual options using the same option merging logic in `Vue.extend()`. e.g. If your mixin contains a created hook and the component itself also has one, both functions will be called.
Mixin hooks are called in the order they are provided, and called before the component's own hooks.
@@ -1069,7 +1069,7 @@ type: api
- **Details:**
- Causes a component to be stateless (no `data`) and instanceless (no `this` context). They are simply a `render` function that returns virtual nodes making them much cheaper to render.
+ Causes a component to be stateless (no `data`) and instanceless (no `this` context). They are only a `render` function that returns virtual nodes making them much cheaper to render.
- **See also:** [Functional Components](../guide/render-function.html#Functional-Components)
@@ -1357,7 +1357,7 @@ type: api
- **Usage:**
- Watch an expression or a computed function on the Vue instance for changes. The callback gets called with the new value and the old value. The expression only accepts simple dot-delimited paths. For more complex expression, use a function instead.
+ Watch an expression or a computed function on the Vue instance for changes. The callback gets called with the new value and the old value. The expression only accepts dot-delimited paths. For more complex expressions, use a function instead.
Note: when mutating (rather than replacing) an Object or an Array, the old value will be the same as new value because they reference the same Object/Array. Vue doesn't keep a copy of the pre-mutate value.
@@ -1763,7 +1763,7 @@ type: api
- **Usage:**
- Attaches an event listener to the element. The event type is denoted by the argument. The expression can either be a method name or an inline statement, or simply omitted when there are modifiers present.
+ Attaches an event listener to the element. The event type is denoted by the argument. The expression can be a method name, an inline statement, or omitted if there are modifiers present.
Starting in 2.4.0+, `v-on` also supports binding to an object of event/listener pairs without an argument. Note when using the object syntax, it does not support any modifiers.
@@ -2131,7 +2131,7 @@ type: api
- **Usage:**
- `` serve as transition effects for **single** element/component. The `` does not render an extra DOM element, nor does it show up in the inspected component hierarchy. It simply applies the transition behavior to the wrapped content inside.
+ `` serve as transition effects for **single** element/component. The `` only applies the transition behavior to the wrapped content inside; it doesn't render an extra DOM element, or show up in the inspected component hierarchy.
```html
diff --git a/src/v2/cookbook/adding-instance-properties.md b/src/v2/cookbook/adding-instance-properties.md
index 81aad09991..b9b03d6abb 100644
--- a/src/v2/cookbook/adding-instance-properties.md
+++ b/src/v2/cookbook/adding-instance-properties.md
@@ -22,7 +22,7 @@ new Vue({
})
```
-Then `"My App"` will be logged to the console. It's that simple!
+Then `"My App"` will be logged to the console!
## The Importance of Scoping Instance Properties
@@ -30,11 +30,11 @@ You may be wondering:
> "Why does `appName` start with `$`? Is that important? What does it do?
-No magic is happening here. `$` is simply a convention Vue uses for properties that are available to all instances. This avoids conflicts with any defined data, computed properties, or methods.
+No magic is happening here. `$` is a convention Vue uses for properties that are available to all instances. This avoids conflicts with any defined data, computed properties, or methods.
> "Conflicts? What do you mean?"
-Another great question! If you just set:
+Another great question! If you set:
``` js
Vue.prototype.appName = 'My App'
@@ -46,7 +46,7 @@ Then what would you expect to be logged below?
new Vue({
data: {
// Uh oh - appName is *also* the name of the
- // instance property we just defined!
+ // instance property we defined!
appName: 'The name of some other app'
},
beforeCreate: function () {
@@ -143,7 +143,7 @@ As long as you're vigilant in scoping prototype properties, using this pattern i
However, it can sometimes cause confusion with other developers. They might see `this.$http`, for example, and think, "Oh, I didn't know about this Vue feature!" Then they move to a different project and are confused when `this.$http` is undefined. Or, maybe they want to Google how to do something, but can't find results because they don't realize they're actually using Axios under an alias.
-__The convenience comes at the cost of explicitness.__ When just looking at a component, it's impossible to tell where `$http` came from. Vue itself? A plugin? A coworker?
+__The convenience comes at the cost of explicitness.__ When looking at a component, it's impossible to tell where `$http` came from. Vue itself? A plugin? A coworker?
So what are the alternatives?
@@ -171,7 +171,7 @@ var App = Object.freeze({
If you raised an eyebrow at `Object.freeze`, what it does is prevent the object from being changed in the future. This essentially makes all its properties constants, protecting you from future state bugs.
-Now the source of these shared properties is much more obvious: there's an `App` object defined somewhere in the app. To find it, developers need only run a project-wide search.
+Now the source of these shared properties is more obvious: there's an `App` object defined somewhere in the app. To find it, developers can run a project-wide search.
Another advantage is that `App` can now be used _anywhere_ in your code, whether it's Vue-related or not. That includes attaching values directly to instance options, rather than having to enter a function to access properties on `this`:
diff --git a/src/v2/guide/class-and-style.md b/src/v2/guide/class-and-style.md
index 5a7c1736f0..bda43c59ee 100644
--- a/src/v2/guide/class-and-style.md
+++ b/src/v2/guide/class-and-style.md
@@ -4,7 +4,7 @@ type: guide
order: 6
---
-A common need for data binding is manipulating an element's class list and its inline styles. Since they are both attributes, we can use `v-bind` to handle them: we just need to calculate a final string with our expressions. However, meddling with string concatenation is annoying and error-prone. For this reason, Vue provides special enhancements when `v-bind` is used with `class` and `style`. In addition to strings, the expressions can also evaluate to objects or arrays.
+A common need for data binding is manipulating an element's class list and its inline styles. Since they are both attributes, we can use `v-bind` to handle them: we only need to calculate a final string with our expressions. However, meddling with string concatenation is annoying and error-prone. For this reason, Vue provides special enhancements when `v-bind` is used with `class` and `style`. In addition to strings, the expressions can also evaluate to objects or arrays.
## Binding HTML Classes
diff --git a/src/v2/guide/comparison.md b/src/v2/guide/comparison.md
index aeb20429cd..87b7bfb21c 100644
--- a/src/v2/guide/comparison.md
+++ b/src/v2/guide/comparison.md
@@ -54,7 +54,7 @@ Render functions with JSX have a few advantages:
In Vue, we also have [render functions](render-function.html) and even [support JSX](render-function.html#JSX), because sometimes you do need that power. However, as the default experience we offer templates as a simpler alternative. Any valid HTML is also a valid Vue template, and this leads to a few advantages of its own:
-- For many developers who have been working with HTML, templates simply feel more natural to read and write. The preference itself can be somewhat subjective, but if it makes the developer more productive then the benefit is objective.
+- For many developers who have been working with HTML, templates feel more natural to read and write. The preference itself can be somewhat subjective, but if it makes the developer more productive then the benefit is objective.
- HTML-based templates make it much easier to progressively migrate existing applications to take advantage of Vue's reactivity features.
@@ -62,7 +62,7 @@ In Vue, we also have [render functions](render-function.html) and even [support
- You can even use pre-processors such as Pug (formerly known as Jade) to author your Vue templates.
-Some argue that you'd need to learn an extra DSL (Domain-Specific Language) to be able to write templates - we believe this difference is superficial at best. First, JSX doesn't mean the user doesn't need to learn anything - it's additional syntax on top of plain JavaScript, so it's easy for anyone familiar with JavaScript to learn, but saying it's essentially free is misleading. Similarly, a template is just additional syntax on top of plain HTML and thus has very low learning cost for those who are already familiar with HTML. With the DSL we are also able to help the user get more done with less code (e.g. `v-on` modifiers). The same task can involve a lot more code when using plain JSX or render functions.
+Some argue that you'd need to learn an extra DSL (Domain-Specific Language) to be able to write templates - we believe this difference is superficial at best. First, JSX doesn't mean the user doesn't need to learn anything - it's additional syntax on top of plain JavaScript, so it can be easy for someone familiar with JavaScript to learn, but saying it's essentially free is misleading. Similarly, a template is just additional syntax on top of plain HTML and thus has very low learning cost for those who are already familiar with HTML. With the DSL we are also able to help the user get more done with less code (e.g. `v-on` modifiers). The same task can involve a lot more code when using plain JSX or render functions.
On a higher level, we can divide components into two categories: presentational ones and logical ones. We recommend using templates for presentational components and render function / JSX for logical ones. The percentage of these components depends on the type of app you are building, but in general we find presentational ones to be much more common.
@@ -140,7 +140,7 @@ Vue is much simpler than AngularJS, both in terms of API and design. Learning en
### Flexibility and Modularity
-AngularJS has strong opinions about how your applications should be structured, while Vue is a more flexible, modular solution. While this makes Vue more adaptable to a wide variety of projects, we also recognize that sometimes it's useful to have some decisions made for you, so that you can just get started coding.
+AngularJS has strong opinions about how your applications should be structured, while Vue is a more flexible, modular solution. While this makes Vue more adaptable to a wide variety of projects, we also recognize that sometimes it's useful to have some decisions made for you, so that you can just start coding.
That's why we offer a [webpack template](https://github.com/vuejs-templates/webpack) that can set you up within minutes, while also granting you access to advanced features such as hot module reloading, linting, CSS extraction, and much more.
@@ -154,7 +154,7 @@ Vue has a clearer separation between directives and components. Directives are m
### Performance
-Vue has better performance and is much, much easier to optimize because it doesn't use dirty checking. AngularJS becomes slow when there are a lot of watchers, because every time anything in the scope changes, all these watchers need to be re-evaluated again. Also, the digest cycle may have to run multiple times to "stabilize" if some watcher triggers another update. AngularJS users often have to resort to esoteric techniques to get around the digest cycle, and in some situations, there's simply no way to optimize a scope with many watchers.
+Vue has better performance and is much, much easier to optimize because it doesn't use dirty checking. AngularJS becomes slow when there are a lot of watchers, because every time anything in the scope changes, all these watchers need to be re-evaluated again. Also, the digest cycle may have to run multiple times to "stabilize" if some watcher triggers another update. AngularJS users often have to resort to esoteric techniques to get around the digest cycle, and in some situations, there's no way to optimize a scope with many watchers.
Vue doesn't suffer from this at all because it uses a transparent dependency-tracking observation system with async queueing - all changes trigger independently unless they have explicit dependency relationships.
@@ -166,7 +166,7 @@ We have a separate section for the new Angular because it really is a completely
### TypeScript
-Angular essentially requires using TypeScript, given that almost all its documentation and learning resources are TypeScript-based. TypeScript has its obvious benefits - static type checking can be very useful for large-scale applications, and can be a big productivity boost for developers with backgrounds in Java and C#.
+Angular essentially requires using TypeScript, given that almost all its documentation and learning resources are TypeScript-based. TypeScript has its benefits - static type checking can be very useful for large-scale applications, and can be a big productivity boost for developers with backgrounds in Java and C#.
However, not everyone wants to use TypeScript. In many smaller-scale use cases, introducing a type system may result in more overhead than productivity gain. In those cases you'd be better off going with Vue instead, since using Angular without TypeScript can be challenging.
@@ -186,7 +186,7 @@ Vue is much less opinionated than Angular, offering official support for a varie
To get started with Vue, all you need is familiarity with HTML and ES5 JavaScript (i.e. plain JavaScript). With these basic skills, you can start building non-trivial applications within less than a day of reading [the guide](./).
-Angular's learning curve is much steeper. The API surface of the framework is simply huge and as a user you will need to familiarize yourself with a lot more concepts before getting productive. Obviously, the complexity of Angular is largely due to its design goal of targeting only large, complex applications - but that does make the framework a lot more difficult for less-experienced developers to pick up.
+Angular's learning curve is much steeper. The API surface of the framework is huge and as a user you will need to familiarize yourself with a lot more concepts before getting productive. The complexity of Angular is largely due to its design goal of targeting only large, complex applications - but that does make the framework a lot more difficult for less-experienced developers to pick up.
## Ember
diff --git a/src/v2/guide/components.md b/src/v2/guide/components.md
index 250bbf7d35..4a82a8985e 100644
--- a/src/v2/guide/components.md
+++ b/src/v2/guide/components.md
@@ -235,8 +235,8 @@ A prop is a custom attribute for passing information from parent components. A c
Vue.component('child', {
// declare the props
props: ['message'],
- // just like data, the prop can be used inside templates
- // and is also made available in the vm as this.message
+ // like data, the prop can be used inside templates and
+ // is also made available in the vm as this.message
template: '{{ message }}'
})
```
@@ -297,7 +297,7 @@ Similar to binding a normal attribute to an expression, we can also use `v-bind`
```
-It's often simpler to use the shorthand syntax for `v-bind`:
+You can also use the shorthand syntax for `v-bind`:
``` html
@@ -369,13 +369,13 @@ However, since this is a literal prop, its value is passed down as a plain strin
### One-Way Data Flow
-All props form a **one-way-down** binding between the child property and the parent one: when the parent property updates, it will flow down to the child, but not the other way around. This prevents child components from accidentally mutating the parent's state, which can make your app's data flow harder to reason about.
+All props form a **one-way-down** binding between the child property and the parent one: when the parent property updates, it will flow down to the child, but not the other way around. This prevents child components from accidentally mutating the parent's state, which can make your app's data flow harder to understand.
In addition, every time the parent component is updated, all props in the child component will be refreshed with the latest value. This means you should **not** attempt to mutate a prop inside a child component. If you do, Vue will warn you in the console.
There are usually two cases where it's tempting to mutate a prop:
-1. The prop is used to only pass in an initial value, the child component simply wants to use it as a local data property afterwards;
+1. The prop is used to pass in an initial value; the child component wants to use it as a local data property afterwards.
2. The prop is passed in as a raw value that needs to be transformed.
@@ -605,7 +605,7 @@ In some cases we may need "two-way binding" for a prop - in fact, in Vue 1.x thi
This is why we removed the `.sync` modifier when 2.0 was released. However, we've found that there are indeed cases where it could be useful, especially when shipping reusable components. What we need to change is **making the code in the child that affects parent state more consistent and explicit.**
-In 2.3.0+ we re-introduced the `.sync` modifier for props, but this time it is just syntax sugar that automatically expands into an additional `v-on` listener:
+In 2.3.0+ we re-introduced the `.sync` modifier for props, but this time it is only syntax sugar that automatically expands into an additional `v-on` listener:
The following
@@ -633,7 +633,7 @@ Custom events can also be used to create custom inputs that work with `v-model`.
```
-is just syntactic sugar for:
+is syntactic sugar for:
``` html
@@ -963,7 +963,7 @@ The content distribution API is a very useful mechanism when designing component
A scoped slot is a special type of slot that functions as a reusable template (that can be passed data to) instead of already-rendered-elements.
-In a child component, simply pass data into a slot as if you are passing props to a component:
+In a child component, pass data into a slot as if you are passing props to a component:
``` html
@@ -1134,7 +1134,7 @@ Vue.component('async-example', function (resolve, reject) {
})
```
-The factory function receives a `resolve` callback, which should be called when you have retrieved your component definition from the server. You can also call `reject(reason)` to indicate the load has failed. The `setTimeout` here is simply for demonstration; How to retrieve the component is entirely up to you. One recommended approach is to use async components together with [Webpack's code-splitting feature](https://webpack.js.org/guides/code-splitting/):
+The factory function receives a `resolve` callback, which should be called when you have retrieved your component definition from the server. You can also call `reject(reason)` to indicate the load has failed. The `setTimeout` here is for demonstration; how to retrieve the component is up to you. One recommended approach is to use async components together with [Webpack's code-splitting feature](https://webpack.js.org/guides/code-splitting/):
``` js
Vue.component('async-webpack-example', function (resolve) {
@@ -1165,7 +1165,7 @@ new Vue({
})
```
-
If you're a Browserify user that would like to use async components, its creator has unfortunately [made it clear](https://github.com/substack/node-browserify/issues/58#issuecomment-21978224) that async loading "is not something that Browserify will ever support." Officially, at least. The Browserify community has found [some workarounds](https://github.com/vuejs/vuejs.org/issues/620), which may be helpful for existing and complex applications. For all other scenarios, we recommend simply using Webpack for built-in, first-class async support.
+
If you're a Browserify user that would like to use async components, its creator has unfortunately [made it clear](https://github.com/substack/node-browserify/issues/58#issuecomment-21978224) that async loading "is not something that Browserify will ever support." Officially, at least. The Browserify community has found [some workarounds](https://github.com/vuejs/vuejs.org/issues/620), which may be helpful for existing and complex applications. For all other scenarios, we recommend using Webpack for built-in, first-class async support.
### Advanced Async Components
diff --git a/src/v2/guide/computed.md b/src/v2/guide/computed.md
index 8ee6876301..1fd03996d3 100644
--- a/src/v2/guide/computed.md
+++ b/src/v2/guide/computed.md
@@ -6,7 +6,7 @@ order: 5
## Computed Properties
-In-template expressions are very convenient, but they are really only meant for simple operations. Putting too much logic into your templates can make them bloated and hard to maintain. For example:
+In-template expressions are very convenient, but they are meant for simple operations. Putting too much logic in your templates can make them bloated and hard to maintain. For example:
``` html
@@ -75,7 +75,7 @@ console.log(vm.reversedMessage) // => 'eybdooG'
You can open the console and play with the example vm yourself. The value of `vm.reversedMessage` is always dependent on the value of `vm.message`.
-You can data-bind to computed properties in templates just like a normal property. Vue is aware that `vm.reversedMessage` depends on `vm.message`, so it will update any bindings that depend on `vm.reversedMessage` when `vm.message` changes. And the best part is that we've created this dependency relationship declaratively: the computed getter function has no side effects, which makes it easy to test and reason about.
+You can data-bind to computed properties in templates just like a normal property. Vue is aware that `vm.reversedMessage` depends on `vm.message`, so it will update any bindings that depend on `vm.reversedMessage` when `vm.message` changes. And the best part is that we've created this dependency relationship declaratively: the computed getter function has no side effects, which makes it easier to test and understand.
### Computed Caching vs Methods
@@ -201,7 +201,7 @@ For example:
-
+
{% endraw %}
-This isn't always desirable though, so Vue offers a way for you to say, "These two elements are completely separate - don't re-use them." Just add a `key` attribute with unique values:
+This isn't always desirable though, so Vue offers a way for you to say, "These two elements are completely separate - don't re-use them." Add a `key` attribute with unique values:
``` html
@@ -180,7 +180,7 @@ Another option for conditionally displaying an element is the `v-show` directive
Hello!
```
-The difference is that an element with `v-show` will always be rendered and remain in the DOM; `v-show` simply toggles the `display` CSS property of the element.
+The difference is that an element with `v-show` will always be rendered and remain in the DOM; `v-show` only toggles the `display` CSS property of the element.
Note that `v-show` doesn't support the `` syntax, nor does it work with `v-else`.
@@ -190,7 +190,7 @@ The difference is that an element with `v-show` will always be rendered and rema
`v-if` is also **lazy**: if the condition is false on initial render, it will not do anything - the conditional block won't be rendered until the condition becomes true for the first time.
-In comparison, `v-show` is much simpler - the element is always rendered regardless of initial condition, with just simple CSS-based toggling.
+In comparison, `v-show` is much simpler - the element is always rendered regardless of initial condition, with CSS-based toggling.
Generally speaking, `v-if` has higher toggle costs while `v-show` has higher initial render costs. So prefer `v-show` if you need to toggle something very often, and prefer `v-if` if the condition is unlikely to change at runtime.
diff --git a/src/v2/guide/custom-directive.md b/src/v2/guide/custom-directive.md
index b883dede65..1efb31377e 100644
--- a/src/v2/guide/custom-directive.md
+++ b/src/v2/guide/custom-directive.md
@@ -6,7 +6,7 @@ order: 302
## Intro
-In addition to the default set of directives shipped in core (`v-model` and `v-show`), Vue also allows you to register your own custom directives. Note that in Vue 2.0, the primary form of code reuse and abstraction is components - however there may be cases where you just need some low-level DOM access on plain elements, and this is where custom directives would still be useful. An example would be focusing on an input element, like this one:
+In addition to the default set of directives shipped in core (`v-model` and `v-show`), Vue also allows you to register your own custom directives. Note that in Vue 2.0, the primary form of code reuse and abstraction is components - however there may be cases where you need some low-level DOM access on plain elements, and this is where custom directives would still be useful. An example would be focusing on an input element, like this one:
{% raw %}
diff --git a/src/v2/guide/events.md b/src/v2/guide/events.md
index 9941a06aa7..fa659fe44b 100644
--- a/src/v2/guide/events.md
+++ b/src/v2/guide/events.md
@@ -44,7 +44,7 @@ var example1 = new Vue({
## Method Event Handlers
-The logic for many event handlers will be more complex though, so keeping your JavaScript in the value of the `v-on` attribute simply isn't feasible. That's why `v-on` can also accept the name of a method you'd like to call.
+The logic for many event handlers will be more complex though, so keeping your JavaScript in the value of the `v-on` attribute isn't feasible. That's why `v-on` can also accept the name of a method you'd like to call.
For example:
@@ -282,7 +282,7 @@ These modifiers restrict the handler to events triggered by a specific mouse but
You might be concerned that this whole event listening approach violates the good old rules about "separation of concerns". Rest assured - since all Vue handler functions and expressions are strictly bound to the ViewModel that's handling the current view, it won't cause any maintenance difficulty. In fact, there are several benefits in using `v-on`:
-1. It's easier to locate the handler function implementations within your JS code by simply skimming the HTML template.
+1. It's easier to locate the handler function implementations within your JS code by skimming the HTML template.
2. Since you don't have to manually attach event listeners in JS, your ViewModel code can be pure logic and DOM-free. This makes it easier to test.
diff --git a/src/v2/guide/forms.md b/src/v2/guide/forms.md
index 5614d20635..10fd153e1e 100644
--- a/src/v2/guide/forms.md
+++ b/src/v2/guide/forms.md
@@ -378,6 +378,6 @@ If you want user input to be trimmed automatically, you can add the `trim` modif
## `v-model` with Components
-> If you're not yet familiar with Vue's components, just skip this for now.
+> If you're not yet familiar with Vue's components, you can skip this for now.
HTML's built-in input types won't always meet your needs. Fortunately, Vue components allow you to build reusable inputs with completely customized behavior. These inputs even work with `v-model`! To learn more, read about [custom inputs](components.html#Form-Input-Components-using-Custom-Events) in the Components guide.
diff --git a/src/v2/guide/index.md b/src/v2/guide/index.md
index db33cbd9e5..ef4c65a8f3 100644
--- a/src/v2/guide/index.md
+++ b/src/v2/guide/index.md
@@ -6,7 +6,7 @@ order: 2
## What is Vue.js?
-Vue (pronounced /vjuː/, like **view**) is a **progressive framework** for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is very easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with [modern tooling](single-file-components.html) and [supporting libraries](https://github.com/vuejs/awesome-vue#components--libraries).
+Vue (pronounced /vjuː/, like **view**) is a **progressive framework** for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with [modern tooling](single-file-components.html) and [supporting libraries](https://github.com/vuejs/awesome-vue#components--libraries).
If you are an experienced frontend developer and want to know how Vue compares to other libraries/frameworks, check out the [Comparison with Other Frameworks](comparison.html).
@@ -14,7 +14,7 @@ If you are an experienced frontend developer and want to know how Vue compares t
The official guide assumes intermediate level knowledge of HTML, CSS, and JavaScript. If you are totally new to frontend development, it might not be the best idea to jump right into a framework as your first step - grasp the basics then come back! Prior experience with other frameworks helps, but is not required.
-The easiest way to try out Vue.js is using the [JSFiddle Hello World example](https://jsfiddle.net/chrisvfritz/50wL7mdz/). Feel free to open it in another tab and follow along as we go through some basic examples. Or, you can simply create an index.html file and include Vue with:
+The easiest way to try out Vue.js is using the [JSFiddle Hello World example](https://jsfiddle.net/chrisvfritz/50wL7mdz/). Feel free to open it in another tab and follow along as we go through some basic examples. Or, you can create an index.html file and include Vue with:
``` html
@@ -53,7 +53,7 @@ var app = new Vue({
{% endraw %}
-We have already created our very first Vue app! This looks pretty similar to just rendering a string template, but Vue has done a lot of work under the hood. The data and the DOM are now linked, and everything is now **reactive**. How do we know? Just open your browser's JavaScript console (right now, on this page) and set `app.message` to a different value. You should see the rendered example above update accordingly.
+We have already created our very first Vue app! This looks pretty similar to rendering a string template, but Vue has done a lot of work under the hood. The data and the DOM are now linked, and everything is now **reactive**. How do we know? Open your browser's JavaScript console (right now, on this page) and set `app.message` to a different value. You should see the rendered example above update accordingly.
In addition to text interpolation, we can also bind element attributes like this:
@@ -95,7 +95,7 @@ If you open up your JavaScript console again and enter `app2.message = 'some new
## Conditionals and Loops
-It's quite simple to toggle the presence of an element, too:
+It's easy to toggle the presence of an element, too:
``` html
@@ -220,7 +220,7 @@ var app5 = new Vue({
{% endraw %}
-Note that in this method we simply update the state of our app without touching the DOM - all DOM manipulations are handled by Vue, and the code you write is focused on the underlying logic.
+Note that in this method we update the state of our app without touching the DOM - all DOM manipulations are handled by Vue, and the code you write is focused on the underlying logic.
Vue also provides the `v-model` directive that makes two-way binding between form input and app state a breeze:
@@ -349,7 +349,7 @@ var app7 = new Vue({
{% endraw %}
-This is just a contrived example, but we have managed to separate our app into two smaller units, and the child is reasonably well-decoupled from the parent via the props interface. We can now further improve our `` component with a more complex template and logic without affecting the parent app.
+This is a contrived example, but we have managed to separate our app into two smaller units, and the child is reasonably well-decoupled from the parent via the props interface. We can now further improve our `` component with more complex template and logic without affecting the parent app.
In a large application, it is necessary to divide the whole app into components to make development manageable. We will talk a lot more about components [later in the guide](components.html), but here's an (imaginary) example of what an app's template might look like with components:
@@ -373,4 +373,4 @@ You may have noticed that Vue components are very similar to **Custom Elements**
## Ready for More?
-We've just briefly introduced the most basic features of Vue.js core - the rest of this guide will cover them and other advanced features with much finer details, so make sure to read through it all!
+We've briefly introduced the most basic features of Vue.js core - the rest of this guide will cover them and other advanced features with much finer details, so make sure to read through it all!
diff --git a/src/v2/guide/instance.md b/src/v2/guide/instance.md
index 83857aeb35..799883f7ce 100644
--- a/src/v2/guide/instance.md
+++ b/src/v2/guide/instance.md
@@ -65,7 +65,7 @@ When this data changes, the view will re-render. It should be noted that propert
vm.b = 'hi'
```
-Then changes to `b` will not trigger any view updates. If you know you'll need a property later, but it starts out empty or non-existent, you'll just need to set some initial value. For example:
+Then changes to `b` will not trigger any view updates. If you know you'll need a property later, but it starts out empty or non-existent, you'll need to set some initial value. For example:
``` js
data: {
diff --git a/src/v2/guide/join.md b/src/v2/guide/join.md
index 37be328f0b..f06b7253dd 100644
--- a/src/v2/guide/join.md
+++ b/src/v2/guide/join.md
@@ -1,51 +1,51 @@
----
-title: Join the Vue.js Community!
-type: guide
-order: 802
----
-
-Vue's community is growing incredibly fast and if you're reading this, there's a good chance you're ready to join it. So... welcome!
-
-Now we'll answer both what the community can do for you and what you can do for the community.
-
-## Resources You'll Enjoy
-
-### Get Support
-
-- [Forum](https://forum.vuejs.org/): The best place to ask questions and get answers about Vue and its ecosystem.
-- [Chat](https://chat.vuejs.org/): A place for Vue devs to meet and chat in real time.
-- [Github](https://github.com/vuejs): If you have a bug to report or feature to request, that's what the GitHub issues are for. We also welcome pull requests!
-
-### Explore the Ecosystem
-
-- [The Awesome Vue Page](https://github.com/vuejs/awesome-vue): See what other awesome resources have been published by other awesome people.
-- [The "Show and Tell" Subforum](https://forum.vuejs.org/c/show-and-tell): Another great place to check out what others have built with and for the growing Vue ecosystem.
-
-## What You Can Do
-
-### Contribute Code
-
-As with any project, there are rules to contributing. To ensure that we can help you or accept your pull request as quickly as possible, please read [the contributing guide](https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md).
-
-After that, you'll be ready to contribute to Vue's core repositories:
-
-- [vue](https://github.com/vuejs/vue): the core library
-- [vuex](https://github.com/vuejs/vuex): Flux-inspired state management
-- [vue-router](https://github.com/vuejs/vue-router): a routing system for SPAs
-
-...as well as many smaller official [companion libraries](https://github.com/vuejs).
-
-### Share (and Build) Your Experience
-
-Apart from answering questions and sharing resources in the forum and chat, there are a few other less obvious ways to share and expand what you know:
-
-- **Develop learning materials.** It's often said that the best way to learn is to teach. If there's something interesting you're doing with Vue, strengthen your expertise by writing a blog post, developing a workshop, or even just publishing a gist that you share on social media.
-- **Watch a repo you care about.** This will send you notifications whenever there's activity in that repository, giving you insider knowledge about ongoing discussions and upcoming features. It's a fantastic way to build expertise so that you're eventually able to help address issues and pull requests.
-
-### Translate Docs
-
-Vue has already spread across the globe, with even the core team in at least half a dozen timezones. [The forum](https://forum.vuejs.org/) includes 7 languages and counting and many of our docs have [actively-maintained translations](https://github.com/vuejs?utf8=%E2%9C%93&query=vuejs.org). We're very proud of Vue's international reach, but we can do even better.
-
-I hope that right now, you're reading this sentence in your preferred language. If not, would you like to help us get there?
-
-If so, please feel free to fork the repo for [these docs](https://github.com/vuejs/vuejs.org/) or for any other officially maintained documentation, then start translating. Once you've made some progress, open an issue or pull request in the main repo and we'll put out a call for more contributors to help you out.
+---
+title: Join the Vue.js Community!
+type: guide
+order: 802
+---
+
+Vue's community is growing incredibly fast and if you're reading this, there's a good chance you're ready to join it. So... welcome!
+
+Now we'll answer both what the community can do for you and what you can do for the community.
+
+## Resources You'll Enjoy
+
+### Get Support
+
+- [Forum](https://forum.vuejs.org/): The best place to ask questions and get answers about Vue and its ecosystem.
+- [Chat](https://chat.vuejs.org/): A place for Vue devs to meet and chat in real time.
+- [Github](https://github.com/vuejs): If you have a bug to report or feature to request, that's what the GitHub issues are for. We also welcome pull requests!
+
+### Explore the Ecosystem
+
+- [The Awesome Vue Page](https://github.com/vuejs/awesome-vue): See what other awesome resources have been published by other awesome people.
+- [The "Show and Tell" Subforum](https://forum.vuejs.org/c/show-and-tell): Another great place to check out what others have built with and for the growing Vue ecosystem.
+
+## What You Can Do
+
+### Contribute Code
+
+As with any project, there are rules to contributing. To ensure that we can help you or accept your pull request as quickly as possible, please read [the contributing guide](https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md).
+
+After that, you'll be ready to contribute to Vue's core repositories:
+
+- [vue](https://github.com/vuejs/vue): the core library
+- [vuex](https://github.com/vuejs/vuex): Flux-inspired state management
+- [vue-router](https://github.com/vuejs/vue-router): a routing system for SPAs
+
+...as well as many smaller official [companion libraries](https://github.com/vuejs).
+
+### Share (and Build) Your Experience
+
+Apart from answering questions and sharing resources in the forum and chat, there are a few other less obvious ways to share and expand what you know:
+
+- **Develop learning materials.** It's often said that the best way to learn is to teach. If there's something interesting you're doing with Vue, strengthen your expertise by writing a blog post, developing a workshop, or even publishing a gist that you share on social media.
+- **Watch a repo you care about.** This will send you notifications whenever there's activity in that repository, giving you insider knowledge about ongoing discussions and upcoming features. It's a fantastic way to build expertise so that you're eventually able to help address issues and pull requests.
+
+### Translate Docs
+
+Vue has already spread across the globe, with even the core team in at least half a dozen timezones. [The forum](https://forum.vuejs.org/) includes 7 languages and counting and many of our docs have [actively-maintained translations](https://github.com/vuejs?utf8=%E2%9C%93&query=vuejs.org). We're very proud of Vue's international reach, but we can do even better.
+
+I hope that right now, you're reading this sentence in your preferred language. If not, would you like to help us get there?
+
+If so, please feel free to fork the repo for [these docs](https://github.com/vuejs/vuejs.org/) or for any other officially maintained documentation, then start translating. Once you've made some progress, open an issue or pull request in the main repo and we'll put out a call for more contributors to help you out.
diff --git a/src/v2/guide/list.md b/src/v2/guide/list.md
index 5ff4501e18..168cda822d 100644
--- a/src/v2/guide/list.md
+++ b/src/v2/guide/list.md
@@ -217,7 +217,7 @@ new Vue({
## `key`
-When Vue is updating a list of elements rendered with `v-for`, by default it uses an "in-place patch" strategy. If the order of the data items has changed, instead of moving the DOM elements to match the order of the items, Vue will simply patch each element in-place and make sure it reflects what should be rendered at that particular index. This is similar to the behavior of `track-by="$index"` in Vue 1.x.
+When Vue is updating a list of elements rendered with `v-for`, by default it uses an "in-place patch" strategy. If the order of the data items has changed, instead of moving the DOM elements to match the order of the items, Vue will patch each element in-place and make sure it reflects what should be rendered at that particular index. This is similar to the behavior of `track-by="$index"` in Vue 1.x.
This default mode is efficient, but only suitable **when your list render output does not rely on child component state or temporary DOM state (e.g. form input values)**.
@@ -251,7 +251,7 @@ You can open the console and play with the previous examples' `items` array by c
### Replacing an Array
-Mutation methods, as the name suggests, mutate the original array they are called on. In comparison, there are also non-mutating methods, e.g. `filter()`, `concat()` and `slice()`, which do not mutate the original array but **always return a new array**. When working with non-mutating methods, you can just replace the old array with the new one:
+Mutation methods, as the name suggests, mutate the original array they are called on. In comparison, there are also non-mutating methods, e.g. `filter()`, `concat()` and `slice()`, which do not mutate the original array but **always return a new array**. When working with non-mutating methods, you can replace the old array with the new one:
``` js
example1.items = example1.items.filter(function (item) {
@@ -319,7 +319,7 @@ You could add a new `age` property to the nested `userProfile` object with:
Vue.set(vm.userProfile, 'age', 27)
```
-You can also use the `vm.$set` instance method, which is just an alias for the global `Vue.set`:
+You can also use the `vm.$set` instance method, which is an alias for the global `Vue.set`:
``` js
this.$set(this.userProfile, 'age', 27)
@@ -366,7 +366,7 @@ computed: {
}
```
-In situations where computed properties are not feasible (e.g. inside nested `v-for` loops), you can just use a method:
+In situations where computed properties are not feasible (e.g. inside nested `v-for` loops), you can use a method:
``` html
{{ n }}
diff --git a/src/v2/guide/migration-vue-router.md b/src/v2/guide/migration-vue-router.md
index 180043ff3a..f107c95538 100644
--- a/src/v2/guide/migration-vue-router.md
+++ b/src/v2/guide/migration-vue-router.md
@@ -18,7 +18,7 @@ router.start({
}, '#app')
```
-You'll just pass a router property to a Vue instance:
+You pass a router property to a Vue instance:
``` js
new Vue({
@@ -424,7 +424,7 @@ var router = new VueRouter({
### `saveScrollPosition` replaced
-This has been replaced with a [`scrollBehavior` option](https://router.vuejs.org/en/advanced/scroll-behavior.html) that accepts a function, so that the scroll behavior is completely customizable - even per route. This opens many new possibilities, but to simply replicate the old behavior of:
+This has been replaced with a [`scrollBehavior` option](https://router.vuejs.org/en/advanced/scroll-behavior.html) that accepts a function, so that the scroll behavior is completely customizable - even per route. This opens many new possibilities, but to replicate the old behavior of:
``` js
saveScrollPosition: true
@@ -537,7 +537,7 @@ There's no longer a use case for this in the new Vue Router.
### `data` replaced
-The `$route` property is now reactive, so you can just use a watcher to react to route changes, like this:
+The `$route` property is now reactive, so you can use a watcher to react to route changes, like this:
``` js
watch: {
diff --git a/src/v2/guide/migration-vuex.md b/src/v2/guide/migration-vuex.md
index abb0be0c34..4a82708574 100644
--- a/src/v2/guide/migration-vuex.md
+++ b/src/v2/guide/migration-vuex.md
@@ -15,7 +15,7 @@ They have slightly different target users however.
__Vuex 2.0__ is a radical redesign and simplification of the API, for those who are starting new projects or want to be on the cutting edge of client-side state management. __It is not covered by this migration guide__, so you should check out [the Vuex 2.0 docs](https://vuex.vuejs.org/en/index.html) if you'd like to learn more about it.
-__Vuex 1.0__ is mostly backwards-compatible, so requires very few changes to upgrade. It is recommended for those with large existing codebases or who just want the smoothest possible upgrade path to Vue 2.0. This guide is dedicated to facilitating that process, but only includes migration notes. For the complete usage guide, see [the Vuex 1.0 docs](https://github.com/vuejs/vuex/tree/1.0/docs/en).
+__Vuex 1.0__ is mostly backwards-compatible, so requires very few changes to upgrade. It is recommended for those with large existing codebases or who want the smoothest possible upgrade path to Vue 2.0. This guide is dedicated to facilitating that process, but only includes migration notes. For the complete usage guide, see [the Vuex 1.0 docs](https://github.com/vuejs/vuex/tree/1.0/docs/en).
## `store.watch` with String Property Path replaced
@@ -73,7 +73,7 @@ See example [the plugins docs](https://github.com/vuejs/vuex/blob/1.0/docs/en/pl
## Middlewares replaced
-Middlewares are replaced by plugins. A plugin is simply a function that receives the store as the only argument, and can listen to the mutation event on the store:
+Middlewares are replaced by plugins. A plugin is a function that receives the store as the only argument, and can listen to the mutation event on the store:
``` js
const myPlugins = store => {
diff --git a/src/v2/guide/migration.md b/src/v2/guide/migration.md
index 7464a98950..2817f43644 100644
--- a/src/v2/guide/migration.md
+++ b/src/v2/guide/migration.md
@@ -18,7 +18,7 @@ I'm glad you asked! The answer is no. About 90% of the API is the same and the c
3. If you have any tests, run them and see what still fails. If you don't have tests, just open the app in your browser and keep an eye out for warnings or errors as you navigate around.
-4. By now, your app should be fully migrated. If you're still hungry for more though, you can read the rest of this page - or just dive in to the new and improved guide from [the beginning](index.html). Many parts will be skimmable, since you're already familiar with the core concepts.
+4. By now, your app should be fully migrated. If you're still hungry for more though, you can read the rest of this page - or dive in to the new and improved guide from [the beginning](index.html). Many parts will be skimmable, since you're already familiar with the core concepts.
> How long will it take to migrate a Vue 1.x app to 2.0?
@@ -47,7 +47,7 @@ Every component must have exactly one root element. Fragment instances are no lo
bar
```
-It's recommended to simply wrap the entire contents in a new element, like this:
+It's recommended to wrap the entire contents in a new element, like this:
``` html
@@ -467,7 +467,7 @@ Using the `debounce` attribute, there'd be no way to detect the "Typing" state,
@@ -598,7 +598,7 @@ strings.map(function (str) {
})
```
-As you can see, `v-model`'s two-way binding doesn't make sense here. Setting `str` to another value in the iterator function will do nothing because it's just a local variable in the function scope.
+As you can see, `v-model`'s two-way binding doesn't make sense here. Setting `str` to another value in the iterator function will do nothing because it's only a local variable in the function scope.
Instead, you should use an array of __objects__ so that `v-model` can update the field on the object. For example:
@@ -705,7 +705,7 @@ Fortunately, since the new directives are much simpler, you can master them more
### Directive `.literal` Modifier removed
-The `.literal` modifier has been removed, as the same can be easily achieved by just providing a string literal as the value.
+The `.literal` modifier has been removed, as the same can be easily achieved by providing a string literal as the value.
For example, you can update:
@@ -713,7 +713,7 @@ For example, you can update:
```
-to just:
+to:
``` html
@@ -741,7 +741,7 @@ Vue's transition system has changed quite drastically and now uses `
### `Vue.transition` for Reusable Transitions replaced
-With the new transition system, you can now just [use components for reusable transitions](transitions.html#Reusable-Transitions).
+With the new transition system, you can now [use components for reusable transitions](transitions.html#Reusable-Transitions).
{% raw %}
@@ -786,7 +786,7 @@ Vue.config.keyCodes.f1 = 112
`$dispatch` and `$broadcast` have been removed in favor of more explicitly cross-component communication and more maintainable state management solutions, such as [Vuex](https://github.com/vuejs/vuex).
-The problem is event flows that depend on a component's tree structure can be hard to reason about and very brittle when the tree becomes large. It simply doesn't scale well and we don't want to set you up for pain later. `$dispatch` and `$broadcast` also do not solve communication between sibling components.
+The problem is event flows that depend on a component's tree structure can be hard to reason about and very brittle when the tree becomes large. It doesn't scale well and we don't want to set you up for pain later. `$dispatch` and `$broadcast` also do not solve communication between sibling components.
One of the most common uses for these methods is to communicate between a parent and its direct children. In these cases, you can actually [listen to an `$emit` from a child with `v-on`](components.html#Form-Input-Components-using-Custom-Events). This allows you to keep the convenience of events with added explicitness.
@@ -1068,7 +1068,7 @@ function pluralizeKnife (count) {
#### Replacing the `currency` Filter
-For a very naive implementation, you could just do something like this:
+For a very naive implementation, you could do something like this:
``` js
'$' + price.toFixed(2)
@@ -1170,7 +1170,7 @@ This makes it possible to use `` on multiple conditional children:
```
-
When `` has multiple children, they should eventually evaluate to a single child. Any child other than the first one will simply be ignored.
+
When `` has multiple children, they should eventually evaluate to a single child. Any child other than the first one will be ignored.
When used together with ``, make sure to nest it inside:
@@ -1265,7 +1265,7 @@ If you were previously relying on `vm.$watch` to do something with the DOM after
### `vm.$set` changed
-`vm.$set` is now just an alias for [`Vue.set`](../api/#Vue-set).
+`vm.$set` is now an alias for [`Vue.set`](../api/#Vue-set).
{% raw %}
@@ -1276,7 +1276,7 @@ If you were previously relying on `vm.$watch` to do something with the DOM after
### `vm.$delete` changed
-`vm.$delete` is now just an alias for [`Vue.delete`](../api/#Vue-delete).
+`vm.$delete` is now an alias for [`Vue.delete`](../api/#Vue-delete).
{% raw %}
@@ -1309,7 +1309,7 @@ methods: {
}
```
-Or better yet, just pass removal methods an index:
+Or better yet, pass removal methods an index:
``` js
methods: {
@@ -1328,7 +1328,7 @@ methods: {
### `Vue.set` and `Vue.delete` on Vue instances removed
-`Vue.set` and `Vue.delete` can no longer work on Vue instances. It is now mandatory to properly declare all top-level reactive properties in the data option. If you'd like to delete properties on a Vue instance or its `$data`, just set it to null.
+`Vue.set` and `Vue.delete` can no longer work on Vue instances. It is now mandatory to properly declare all top-level reactive properties in the data option. If you'd like to delete properties on a Vue instance or its `$data`, set it to null.
{% raw %}
@@ -1350,7 +1350,7 @@ It is now prohibited to replace a component instance's root $data. This prevents
### `vm.$get` removed
-Just retrieve reactive data directly.
+Instead, retrieve reactive data directly.
{% raw %}
@@ -1569,9 +1569,9 @@ Use components instead.
### `Vue.partial` removed
-Partials have been removed in favor of more explicit data flow between components, using props. Unless you're using a partial in a performance-critical area, the recommendation is to simply use a [normal component](components.html) instead. If you were dynamically binding the `name` of a partial, you can use a [dynamic component](components.html#Dynamic-Components).
+Partials have been removed in favor of more explicit data flow between components, using props. Unless you're using a partial in a performance-critical area, the recommendation is to use a [normal component](components.html) instead. If you were dynamically binding the `name` of a partial, you can use a [dynamic component](components.html#Dynamic-Components).
-If you happen to be using partials in a performance-critical part of your app, then you should upgrade to [functional components](render-function.html#Functional-Components). They must be in a plain JS/JSX file (rather than in a `.vue` file) and are stateless and instanceless, just like partials. This makes rendering extremely fast.
+If you happen to be using partials in a performance-critical part of your app, then you should upgrade to [functional components](render-function.html#Functional-Components). They must be in a plain JS/JSX file (rather than in a `.vue` file) and are stateless and instanceless, like partials. This makes rendering extremely fast.
A benefit of functional components over partials is that they can be much more dynamic, because they grant you access to the full power of JavaScript. There is a cost to this power however. If you've never used a component framework with render functions before, they may take a bit longer to learn.
diff --git a/src/v2/guide/mixins.md b/src/v2/guide/mixins.md
index 262e64020b..218c1fd7ec 100644
--- a/src/v2/guide/mixins.md
+++ b/src/v2/guide/mixins.md
@@ -111,7 +111,7 @@ new Vue({
## Custom Option Merge Strategies
-When custom options are merged, they use the default strategy, which simply overwrites the existing value. If you want a custom option to be merged using custom logic, you need to attach a function to `Vue.config.optionMergeStrategies`:
+When custom options are merged, they use the default strategy which overwrites the existing value. If you want a custom option to be merged using custom logic, you need to attach a function to `Vue.config.optionMergeStrategies`:
``` js
Vue.config.optionMergeStrategies.myOption = function (toVal, fromVal) {
@@ -119,7 +119,7 @@ Vue.config.optionMergeStrategies.myOption = function (toVal, fromVal) {
}
```
-For most object-based options, you can simply use the same strategy used by `methods`:
+For most object-based options, you can use the same strategy used by `methods`:
``` js
var strategies = Vue.config.optionMergeStrategies
diff --git a/src/v2/guide/reactivity.md b/src/v2/guide/reactivity.md
index 47f76b035b..773464d3f0 100644
--- a/src/v2/guide/reactivity.md
+++ b/src/v2/guide/reactivity.md
@@ -4,7 +4,7 @@ type: guide
order: 601
---
-Now it's time to take a deep dive! One of Vue's most distinct features is the unobtrusive reactivity system. Models are just plain JavaScript objects. When you modify them, the view updates. It makes state management very simple and intuitive, but it's also important to understand how it works to avoid some common gotchas. In this section, we are going to dig into some of the lower-level details of Vue's reactivity system.
+Now it's time to take a deep dive! One of Vue's most distinct features is the unobtrusive reactivity system. Models are just plain JavaScript objects. When you modify them, the view updates. It makes state management simple and intuitive, but it's also important to understand how it works to avoid some common gotchas. In this section, we are going to dig into some of the lower-level details of Vue's reactivity system.
## How Changes Are Tracked
@@ -38,7 +38,7 @@ Vue does not allow dynamically adding new root-level reactive properties to an a
Vue.set(vm.someObject, 'b', 2)
```
-You can also use the `vm.$set` instance method, which is just an alias to the global `Vue.set`:
+You can also use the `vm.$set` instance method, which is an alias to the global `Vue.set`:
``` js
this.$set(this.someObject, 'b', 2)
@@ -55,7 +55,7 @@ There are also a few array-related caveats, which were discussed earlier in the
## Declaring Reactive Properties
-Since Vue doesn't allow dynamically adding root-level reactive properties, you have to initialize Vue instances by declaring all root-level reactive data properties upfront, even just with an empty value:
+Since Vue doesn't allow dynamically adding root-level reactive properties, you have to initialize Vue instances by declaring all root-level reactive data properties upfront, even with an empty value:
``` js
var vm = new Vue({
diff --git a/src/v2/guide/render-function.md b/src/v2/guide/render-function.md
index b4bc8a4ab5..3b171cb1e1 100644
--- a/src/v2/guide/render-function.md
+++ b/src/v2/guide/render-function.md
@@ -24,7 +24,7 @@ For the HTML above, you decide you want this component interface:
Hello world!
```
-When you get started with a component that just generates a heading based on the `level` prop, you quickly arrive at this:
+When you get started with a component that only generates a heading based on the `level` prop, you quickly arrive at this:
``` html
diff --git a/src/v2/guide/transitions.md b/src/v2/guide/transitions.md
index 8ba1300fc0..5f590ee739 100644
--- a/src/v2/guide/transitions.md
+++ b/src/v2/guide/transitions.md
@@ -24,7 +24,7 @@ Vue provides a `transition` wrapper component, allowing you to add entering/leav
- Dynamic components
- Component root nodes
-This is what a very simple example looks like in action:
+This is what an example looks like in action:
``` html
@@ -114,7 +114,7 @@ Each of these classes will be prefixed with the name of the transition. Here the
### CSS Transitions
-One of the most common transition types uses CSS transitions. Here's a simple example:
+One of the most common transition types uses CSS transitions. Here's an example:
``` html
@@ -444,7 +444,7 @@ These hooks can be used in combination with CSS transitions/animations or on the
It's also a good idea to explicitly add `v-bind:css="false"` for JavaScript-only transitions so that Vue can skip the CSS detection. This also prevents CSS rules from accidentally interfering with the transition.
-Now let's dive into an example. Here's a simple JavaScript transition using Velocity.js:
+Now let's dive into an example. Here's a JavaScript transition using Velocity.js:
``` html