diff --git a/src/v2/api/index.md b/src/v2/api/index.md index 1e1c4414b2..2e073bbcb6 100644 --- a/src/v2/api/index.md +++ b/src/v2/api/index.md @@ -943,7 +943,7 @@ type: api - **Details:** - Called when an error from any descendent component is captured. The hook receives three arguments: the error, the component instance that triggered the error, and a string containing information on where the error was captured. The hook can return `false` to stop the error from propagating further. + Called when an error from any descendant component is captured. The hook receives three arguments: the error, the component instance that triggered the error, and a string containing information on where the error was captured. The hook can return `false` to stop the error from propagating further.

You can modify component state in this hook. However, it is important to have conditionals in your template or render function that short circuits other content when an error has been captured; otherwise the component will be thrown into an infinite render loop.

diff --git a/src/v2/guide/components-edge-cases.md b/src/v2/guide/components-edge-cases.md index 4275ce3175..ce67f1b0e5 100644 --- a/src/v2/guide/components-edge-cases.md +++ b/src/v2/guide/components-edge-cases.md @@ -81,7 +81,7 @@ Then inside `` you might find yourself reaching for a hack l var map = this.$parent.map || this.$parent.$parent.map ``` -This has quickly gotten out of hand. That's why to provide context information to descendent components arbitrarily deep, we instead recommend [dependency injection](#Dependency-Injection). +This has quickly gotten out of hand. That's why to provide context information to descendant components arbitrarily deep, we instead recommend [dependency injection](#Dependency-Injection). ### Accessing Child Component Instances & Child Elements @@ -138,7 +138,7 @@ Earlier, when we described [Accessing the Parent Component Instance](#Accessing- In this component, all descendants of `` needed access to a `getMap` method, in order to know which map to interact with. Unfortunately, using the `$parent` property didn't scale well to more deeply nested components. That's where dependency injection can be useful, using two new instance options: `provide` and `inject`. -The `provide` options allows us to specify the data/methods we want to **provide** to descendent components. In this case, that's the `getMap` method inside ``: +The `provide` options allows us to specify the data/methods we want to **provide** to descendant components. In this case, that's the `getMap` method inside ``: ```js provide: function () { @@ -288,7 +288,7 @@ Then a `tree-folder-contents` component with this template: ``` -When you look closely, you'll see that these components will actually be each other's descendent _and_ ancestor in the render tree - a paradox! When registering components globally with `Vue.component`, this paradox is resolved for you automatically. If that's you, you can stop reading here. +When you look closely, you'll see that these components will actually be each other's descendant _and_ ancestor in the render tree - a paradox! When registering components globally with `Vue.component`, this paradox is resolved for you automatically. If that's you, you can stop reading here. However, if you're requiring/importing components using a __module system__, e.g. via Webpack or Browserify, you'll get an error: