Skip to content

Commit 71791c2

Browse files
devisasariNataliaTepluhinaskirtles-code
authored
Fix typos and grammar (vuejs#2037)
* fix typo * fix typo * fix typo and grammar * fix typo * fix typo and grammar * fix typo and grammar * fix typo and grammar * fix typo * fix grammar * fix typo * fix typo and grammar * fix typo * Update src/guide/essentials/template-syntax.md Co-authored-by: skirtle <[email protected]> * Update src/guide/introduction.md Co-authored-by: skirtle <[email protected]> * Update src/guide/introduction.md Co-authored-by: skirtle <[email protected]> Co-authored-by: Natalia Tepluhina <[email protected]> Co-authored-by: skirtle <[email protected]>
1 parent 2aff4a0 commit 71791c2

File tree

9 files changed

+27
-27
lines changed

9 files changed

+27
-27
lines changed

src/guide/essentials/application.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ App (root component)
3939
└─ TodoStatistics
4040
```
4141

42-
We will discuss how to define and compose multiple components together in later sections of the guide. Before that, we will focus on what happens inside a single component.
42+
In later sections of the guide, we will discuss how to define and compose multiple components together. Before that, we will focus on what happens inside a single component.
4343

4444
## Mounting the App
4545

@@ -85,7 +85,7 @@ Vue will automatically use the container's `innerHTML` as the template if the ro
8585

8686
## App Configurations
8787

88-
The application instance exposes a `.config` object that allows us to configure a few app-level options, for example defining an app-level error handler that captures errors from all descendant components:
88+
The application instance exposes a `.config` object that allows us to configure a few app-level options, for example, defining an app-level error handler that captures errors from all descendant components:
8989

9090
```js
9191
app.config.errorHandler = (err) => {

src/guide/essentials/reactivity-fundamentals.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export default {
101101
<div>{{ state.count }}</div>
102102
```
103103

104-
Similarly, we can declare functions that mutate reactive state in the same scope, and expose it as a method alongside the state:
104+
Similarly, we can declare functions that mutate reactive state in the same scope and expose it as a method alongside the state:
105105

106106
```js{7-9,14}
107107
import { reactive } from 'vue'
@@ -298,7 +298,7 @@ function mutateDeeply() {
298298

299299
</div>
300300

301-
It is also possible to explicitly create [shallow reactive objects](/api/reactivity-advanced.html#shallowreactive) where the reactivity is only tracked at the root-level, however they are typically only needed in advanced use cases.
301+
It is also possible to explicitly create [shallow reactive objects](/api/reactivity-advanced.html#shallowreactive) where the reactivity is only tracked at the root-level, but these are typically only needed in advanced use cases.
302302

303303
<div class="composition-api">
304304

@@ -451,9 +451,9 @@ function increment() {
451451

452452
[Try it in the Playground](https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cD5cbmltcG9ydCB7IHJlZiB9IGZyb20gJ3Z1ZSdcblxuY29uc3QgY291bnQgPSByZWYoMClcblxuZnVuY3Rpb24gaW5jcmVtZW50KCkge1xuICBjb3VudC52YWx1ZSsrXG59XG48L3NjcmlwdD5cblxuPHRlbXBsYXRlPlxuICA8YnV0dG9uIEBjbGljaz1cImluY3JlbWVudFwiPnt7IGNvdW50IH19PC9idXR0b24+XG48L3RlbXBsYXRlPiIsImltcG9ydC1tYXAuanNvbiI6IntcbiAgXCJpbXBvcnRzXCI6IHtcbiAgICBcInZ1ZVwiOiBcImh0dHBzOi8vc2ZjLnZ1ZWpzLm9yZy92dWUucnVudGltZS5lc20tYnJvd3Nlci5qc1wiXG4gIH1cbn0ifQ==)
453453

454-
Note the unwrapping only applies if the ref is a top-level property on the template render context. As an example, `foo` is a top-level property, but `object.foo` is not.
454+
Note that the unwrapping only applies if the ref is a top-level property on the template render context. As an example, `foo` is a top-level property, but `object.foo` is not.
455455

456-
So given the following object:
456+
So, given the following object:
457457

458458
```js
459459
const object = { foo: ref(1) }

src/guide/essentials/template-syntax.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Vue uses an HTML-based template syntax that allows you to declaratively bind the rendered DOM to the underlying component instance's data. All Vue templates are syntactically valid HTML that can be parsed by spec-compliant browsers and HTML parsers.
44

5-
Under the hood, Vue compiles the templates into highly-optimized JavaScript code. Combined with the reactivity system, Vue is able to intelligently figure out the minimal number of components to re-render and apply the minimal amount of DOM manipulations when the app state changes.
5+
Under the hood, Vue compiles the templates into highly-optimized JavaScript code. Combined with the reactivity system, Vue can intelligently figure out the minimal number of components to re-render and apply the minimal amount of DOM manipulations when the app state changes.
66

77
If you are familiar with Virtual DOM concepts and prefer the raw power of JavaScript, you can also [directly write render functions](/guide/extras/render-function.html) instead of templates, with optional JSX support. However, do note that they do not enjoy the same level of compile-time optimizations as templates.
88

@@ -134,7 +134,7 @@ In Vue templates, JavaScript expressions can be used in the following positions:
134134

135135
### Expressions Only
136136

137-
Each binding can only contain **one single expression**. An expression is a piece of code that can evaluate to a value. A simple check is whether it can be used after `return`.
137+
Each binding can only contain **one single expression**. An expression is a piece of code that can be evaluated to a value. A simple check is whether it can be used after `return`.
138138

139139
Therefore, the following will **NOT** work:
140140

@@ -189,7 +189,7 @@ Some directives can take an "argument", denoted by a colon after the directive n
189189
<a :href="url"> ... </a>
190190
```
191191

192-
Here `href` is the argument, which tells the `v-bind` directive to bind the element's `href` attribute to the value of the expression `url`. In the shorthand, everything before the argument (i.e. `v-bind:`) is condensed into a single character, `:`.
192+
Here, `href` is the argument, which tells the `v-bind` directive to bind the element's `href` attribute to the value of the expression `url`. In the shorthand, everything before the argument (i.e., `v-bind:`) is condensed into a single character, `:`.
193193

194194
Another example is the `v-on` directive, which listens to DOM events:
195195

@@ -200,7 +200,7 @@ Another example is the `v-on` directive, which listens to DOM events:
200200
<a @click="doSomething"> ... </a>
201201
```
202202

203-
Here the argument is the event name to listen to: `click`. `v-on` has a corresponding shorthand, namely the `@` character. We will talk about event handling in more detail too.
203+
Here, the argument is the event name to listen to: `click`. `v-on` has a corresponding shorthand, namely the `@` character. We will talk about event handling in more detail too.
204204

205205
### Dynamic Arguments
206206

@@ -217,7 +217,7 @@ as explained in the "Dynamic Argument Value Constraints" and "Dynamic Argument S
217217
<a :[attributeName]="url"> ... </a>
218218
```
219219

220-
Here `attributeName` will be dynamically evaluated as a JavaScript expression, and its evaluated value will be used as the final value for the argument. For example, if your component instance has a data property, `attributeName`, whose value is `"href"`, then this binding will be equivalent to `v-bind:href`.
220+
Here, `attributeName` will be dynamically evaluated as a JavaScript expression, and its evaluated value will be used as the final value for the argument. For example, if your component instance has a data property, `attributeName`, whose value is `"href"`, then this binding will be equivalent to `v-bind:href`.
221221

222222
Similarly, you can use dynamic arguments to bind a handler to a dynamic event name:
223223

src/guide/extras/animation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ In addition to color, you can also use style bindings to animate transform, widt
147147

148148
## Animating with Watchers
149149

150-
With some creativity, we can use watchers to animate anything based on some numerical state. For example we can animate the number itself:
150+
With some creativity, we can use watchers to animate anything based on some numerical state. For example, we can animate the number itself:
151151

152152
<div class="composition-api">
153153

src/guide/extras/reactivity-in-depth.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ The `ref()`, `computed()` and `watchEffect()` APIs are all part of the Compositi
208208

209209
## Runtime vs. Compile-time Reactivity
210210

211-
Vue's reactivity system is primarily runtime-based: the tracking and triggering are all performed while the code is running directly in the browser. The pros of runtime reactivity is that it can work without a build step, and there are fewer edge cases. On the other hand, this makes it constrained by the syntax limitations of JavaScript.
211+
Vue's reactivity system is primarily runtime-based: the tracking and triggering are all performed while the code is running directly in the browser. The pros of runtime reactivity are that it can work without a build step, and there are fewer edge cases. On the other hand, this makes it constrained by the syntax limitations of JavaScript.
212212

213213
We have already encountered a limitation in the previous example: JavaScript does not provide a way for us to intercept the reading and writing of local variables, so we have to always access reactive state as object properties, using either reactive objects or refs.
214214

src/guide/extras/rendering-mechanism.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ How does Vue take a template and turn it into actual DOM nodes? How does Vue upd
88

99
## Virtual DOM
1010

11-
You have probably heard about the term virtual DOM, which Vue's rendering system is based upon.
11+
You have probably heard about the term "virtual DOM", which Vue's rendering system is based upon.
1212

1313
The virtual DOM (VDOM) is a programming concept where an ideal, or “virtual”, representation of a UI is kept in memory and synced with the “real” DOM. The concept was pioneered by [React](https://reactjs.org/), and has been adapted in many other frameworks with different implementations, including Vue.
1414

src/guide/extras/web-components.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ document.body.appendChild(
132132

133133
- Properties with primitive values (`string`, `boolean` or `number`) are reflected as attributes.
134134

135-
- Vue also automatically casts props declared with `Boolean` or `Number` types into the desired type when they are set as attributes (which are always strings). For example given the following props declaration:
135+
- Vue also automatically casts props declared with `Boolean` or `Number` types into the desired type when they are set as attributes (which are always strings). For example, given the following props declaration:
136136

137137
```js
138138
props: {
@@ -192,7 +192,7 @@ const ExampleElement = defineCustomElement(Example)
192192
customElements.define('my-example', ExampleElement)
193193
```
194194

195-
If you wish to customize what files should be imported in custom element mode (for example treating _all_ SFCs as custom elements), you can pass the `customElement` option to the respective build plugins:
195+
If you wish to customize what files should be imported in custom element mode (for example, treating _all_ SFCs as custom elements), you can pass the `customElement` option to the respective build plugins:
196196

197197
- [@vitejs/plugin-vue](https://github.com/vitejs/vite/tree/main/packages/plugin-vue#using-vue-sfcs-as-custom-elements)
198198
- [vue-loader](https://github.com/vuejs/vue-loader/tree/next#v16-only-options)
@@ -248,4 +248,4 @@ There are also some areas where we find custom elements to be limiting:
248248

249249
- Shipping custom elements with shadow DOM scoped CSS today requires embedding the CSS inside JavaScript so that they can be injected into shadow roots at runtime. They also result in duplicated styles in markup in SSR scenarios. There are [platform features](https://github.com/whatwg/html/pull/4898/) being worked on in this area - but as of now they are not yet universally supported, and there are still production performance / SSR concerns to be addressed. In the meanwhile, Vue SFCs provide [CSS scoping mechanisms](/api/sfc-css-features.html) that support extracting the styles into plain CSS files.
250250

251-
Vue will always be staying up to date with the latest standards in the web platform, and we will happily leverage whatever the platform provides if it makes our job easier. However, our goal is to provide solutions that work well and work today. That means we have to incorporate new platform features with a critical mindset - and that involves filling the gaps where the standards fall short while that is still the case.
251+
Vue will always stay up to date with the latest standards in the web platform, and we will happily leverage whatever the platform provides if it makes our job easier. However, our goal is to provide solutions that work well and work today. That means we have to incorporate new platform features with a critical mindset - and that involves filling the gaps where the standards fall short while that is still the case.

src/guide/introduction.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ footer: false
2525

2626
## What is Vue?
2727

28-
Vue (pronounced /vjuː/, like **view**) is a JavaScript framework for building user interfaces. It builds on top of standard HTML, CSS and JavaScript, and provides a declarative and component-based programming model that helps you efficiently develop user interfaces, be it simple or complex.
28+
Vue (pronounced /vjuː/, like **view**) is a JavaScript framework for building user interfaces. It builds on top of standard HTML, CSS, and JavaScript and provides a declarative and component-based programming model that helps you efficiently develop user interfaces, be they simple or complex.
2929

3030
Here is a minimal example:
3131

@@ -71,7 +71,7 @@ The above example demonstrates the two core features of Vue:
7171
You may already have questions - don't worry. We will cover every little detail in the rest of the documentation. For now, please read along so you can have a high-level understanding of what Vue offers.
7272

7373
:::tip Prerequisites
74-
The rest of the documentation assumes basic familiarity with 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 and then come back! You can check your knowledge level with [this JavaScript overview](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript). Prior experience with other frameworks helps, but is not required.
74+
The rest of the documentation assumes basic familiarity with 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 and then come back! You can check your knowledge level with [this JavaScript overview](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript). Prior experience with other frameworks helps, but is not required.
7575
:::
7676

7777
## The Progressive Framework
@@ -117,7 +117,7 @@ button {
117117
</style>
118118
```
119119

120-
SFC is a defining feature of Vue, and is the recommended way to author Vue components **if** your use case warrants a build setup. You can learn more about the [how and why of SFC](/guide/scaling-up/sfc) in its dedicated section - but for now, just know that Vue will handle all the build tools setup for you.
120+
SFC is a defining feature of Vue and is the recommended way to author Vue components **if** your use case warrants a build setup. You can learn more about the [how and why of SFC](/guide/scaling-up/sfc) in its dedicated section - but for now, just know that Vue will handle all the build tools setup for you.
121121

122122
## API Styles
123123

@@ -199,7 +199,7 @@ Both API styles are fully capable of covering common use cases. They are differe
199199

200200
The Options API is centered around the concept of a "component instance" (`this` as seen in the example), which typically aligns better with a class-based mental model for users coming from OOP language backgrounds. It is also more beginner-friendly by abstracting away the reactivity details and enforcing code organization via option groups.
201201

202-
The Composition API is centered around declaring reactive state variables directly in a function scope, and composing state from multiple functions together to handle complexity. It is more free-form, and requires understanding of how reactivity works in Vue to be used effectively. In return, its flexibility enables more powerful patterns for organizing and reusing logic.
202+
The Composition API is centered around declaring reactive state variables directly in a function scope and composing state from multiple functions together to handle complexity. It is more free-form and requires an understanding of how reactivity works in Vue to be used effectively. In return, its flexibility enables more powerful patterns for organizing and reusing logic.
203203

204204
You can learn more about the comparison between the two styles and the potential benefits of Composition API in the [Composition API FAQ](/guide/extras/composition-api-faq).
205205

0 commit comments

Comments
 (0)