Skip to content

Fix: three incorrect code examples in the guide#3418

Merged
brc-dd merged 3 commits into
vuejs:mainfrom
StanislavKozachenko:fix/code-examples
Jul 7, 2026
Merged

Fix: three incorrect code examples in the guide#3418
brc-dd merged 3 commits into
vuejs:mainfrom
StanislavKozachenko:fix/code-examples

Conversation

@StanislavKozachenko

Copy link
Copy Markdown
Contributor

Description of Problem

Three errors in code examples across the guide — see issue #3417 for full context.

1. guide/essentials/reactivity-fundamentals — Stateful Methods

The solution block uses _.debounce(this.click, 500), but _ is never imported. The preceding block in the same section already has import { debounce } from 'lodash-es', so calling _.debounce results in a ReferenceError at runtime.

2. guide/components/events — Declaring Emitted Events, Options API

The Options API emits object syntax example contains TypeScript type annotations but is fenced as js. The Composition API counterpart directly above it correctly uses <script setup lang="ts">.

3. guide/components/v-model — Modifiers for v-model with Arguments, Options API

The tag <MyComponent v-model:title.capitalize="myText"> is missing the self-closing />. All other component tags on the page use />.

Proposed Solution

  • reactivity-fundamentals.md: replace _.debounce with debounce
  • events.md: change code fence from js to ts
  • v-model.md: add /> to close the component tag

Additional Information

Closes #3417

@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 6a1bf55
🔍 Latest deploy log https://app.netlify.com/projects/vuejs/deploys/6a3bc49b88b2b80008a81618
😎 Deploy Preview https://deploy-preview-3418--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@brc-dd brc-dd merged commit 142fa3c into vuejs:main Jul 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: three incorrect code examples in the guide

2 participants