Skip to content

Commit 0603def

Browse files
authored
Merge branch 'vuejs:main' into main
2 parents 574a371 + cdafa0f commit 0603def

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

src/api/built-in-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Provides animated transition effects to a **single** element or component.
5555
* Controls the timing sequence of leaving/entering transitions.
5656
* Default behavior is simultaneous.
5757
*/
58-
mode?: 'in-out' | 'out-in'
58+
mode?: 'in-out' | 'out-in' | 'default'
5959
/**
6060
* Whether to apply transition on initial render.
6161
* Default: false

src/api/composition-api-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default {
4141
Note that [refs](/api/reactivity-core.html#ref) returned from `setup` are [automatically shallow unwrapped](/guide/essentials/reactivity-fundamentals.html#deep-reactivity) when accessed in the template so you do not need to use `.value` when accessing them. They are also unwrapped in the same way when accessed on `this`.
4242

4343
:::tip
44-
`setup()` itself does not have access to the component instance - `this` will have a value of `null` inside `setup()`. You can access Composition-API-exposed values from Options API, but not the other way around.
44+
`setup()` itself does not have access to the component instance - `this` will have a value of `undefined` inside `setup()`. You can access Composition-API-exposed values from Options API, but not the other way around.
4545
:::
4646

4747
## Accessing Props

src/api/render-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Creates virtual DOM nodes (vnodes).
9393
})
9494
```
9595

96-
- **See also:** [Guide - Creating VNodes](/guide/extras/render-function.html#creating-vnodes)
96+
- **See also:** [Guide - Render Functions - Creating VNodes](/guide/extras/render-function.html#creating-vnodes)
9797

9898
## mergeProps()
9999

src/guide/components/provide-inject.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export default {
241241

242242
When using reactive provide / inject values, **it is recommended to keep any mutations to reactive state inside of the _provider_ whenever possible**. This ensures that the provided state and its possible mutations are co-located in the same component, making it easier to maintain in the future.
243243

244-
There may be times when we need to update the data from a injector component. In such cases, we recommend providing a function that is responsible for mutating the state:
244+
There may be times when we need to update the data from an injector component. In such cases, we recommend providing a function that is responsible for mutating the state:
245245

246246
```vue{7-9,13}
247247
<!-- inside provider component -->

src/guide/essentials/component-basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ This can be achieved using Vue's custom `<slot>` element:
468468
```vue{4}
469469
<template>
470470
<div class="alert-box">
471-
<strong>Error!</strong>
471+
<strong>This is an Error for Demo Purposes</strong>
472472
<slot />
473473
</div>
474474
</template>

src/guide/essentials/reactivity-fundamentals.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,12 @@ The `reactive()` API has two limitations:
343343

344344
1. It only works for object types (objects, arrays, and [collection types](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects#keyed_collections) such as `Map` and `Set`). It cannot hold [primitive types](https://developer.mozilla.org/en-US/docs/Glossary/Primitive) such as `string`, `number` or `boolean`.
345345

346-
2. Since Vue's reactivity tracking works over property access, we must always keep the same reference to the reactive object. This means we can't easily "replace" a reactive object:
346+
2. Since Vue's reactivity tracking works over property access, we must always keep the same reference to the reactive object. This means we can't easily "replace" a reactive object because the reactivity connection to the first reference is lost:
347347

348348
```js
349349
let state = reactive({ count: 0 })
350350

351-
// this won't work!
351+
// the above reference ({ count: 0 }) is no longer being tracked (reactivity connection is lost!)
352352
state = reactive({ count: 1 })
353353
```
354354

src/guide/extras/web-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ module.exports = {
6464

6565
### Passing DOM Properties
6666

67-
Since DOM attributes can only be strings, we need to pass complex data to custom elements as DOM properties. When setting props on a custom element, Vue 3 automatically checks DOM-property presence using the `in` operator and will prefer setting the value as a DOM property if the key is present. This means that, in most cases, you won't need to think about this if the custom element follows the [recommended best practices](https://developers.google.com/web/fundamentals/web-components/best-practices#aim-to-keep-primitive-data-attributes-and-properties-in-sync,-reflecting-from-property-to-attribute,-and-vice-versa.).
67+
Since DOM attributes can only be strings, we need to pass complex data to custom elements as DOM properties. When setting props on a custom element, Vue 3 automatically checks DOM-property presence using the `in` operator and will prefer setting the value as a DOM property if the key is present. This means that, in most cases, you won't need to think about this if the custom element follows the [recommended best practices](https://web.dev/index.md/).
6868

6969
However, there could be rare cases where the data must be passed as a DOM property, but the custom element does not properly define/reflect the property (causing the `in` check to fail). In this case, you can force a `v-bind` binding to be set as a DOM property using the `.prop` modifier:
7070

src/guide/scaling-up/state-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ If you are building an application that leverages [Server-Side Rendering (SSR)](
230230
While our hand-rolled state management solution will suffice in simple scenarios, there are many more things to consider in large-scale production applications:
231231

232232
- Stronger conventions for team collaboration
233-
- Integrating with the Vue DevTools, including timeline, in-component inspection, and time-travel debugging.
233+
- Integrating with the Vue DevTools, including timeline, in-component inspection, and time-travel debugging
234234
- Hot Module Replacement
235235
- Server-Side Rendering support
236236

src/guide/typescript/options-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default defineComponent({
2323
},
2424
mounted() {
2525
this.name // type: string | undefined
26-
this.id // type" number | string | undefined
26+
this.id // type: number | string | undefined
2727
this.msg // type: string
2828
this.metadata // type: any
2929
}

0 commit comments

Comments
 (0)