Skip to content

Conversation

@owaiskhan310
Copy link

@owaiskhan310 owaiskhan310 commented Jun 16, 2025

Description of Problem

I was going through the documentations and found an error in the documentations. In the "Typing Component Template Refs" section of "TS with composition API", there is a first code snippet below the description of "Typing Component Template Refs". In this code snippet when we are passing the ref in the component there is a typo error in the name of the ref. We have declared the ref as "compRef " and passed the ref as "comp". This needs to be fixed to ref="compRef".

Proposed Solution

current:
<component :is="Math.random() > 0.5 ? Foo : Bar" ref="comp"

expected:
<component :is="Math.random() > 0.5 ? Foo : Bar" ref="compRef"

Additional Information

I was going through the documentations and found an error in the documentations. In the "Typing Component Template Refs" section of "TS with composition API", there is a first code snippet below the description of "Typing Component Template Refs". In this code snippet when we are passing the ref in the component there is a typo error in the name of the ref. We have declared the ref as "compRef " and passed the ref as "comp". This needs to be fixed to ref="compRef". current: **<component :is="Math.random() > 0.5 ? Foo : Bar" ref="comp" />** expected: **<component :is="Math.random() > 0.5 ? Foo : Bar" ref="compRef" />**
@netlify
Copy link

netlify bot commented Jun 16, 2025

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 5a583dc
🔍 Latest deploy log https://app.netlify.com/projects/vuejs/deploys/684fc587a56d290008589fc7
😎 Deploy Preview https://deploy-preview-3249--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.

@owaiskhan310 owaiskhan310 changed the title Update composition-api.md Update composition-api.md #3250 Jun 16, 2025
@owaiskhan310 owaiskhan310 changed the title Update composition-api.md #3250 Update composition-api.md Jun 16, 2025
@owaiskhan310
Copy link
Author

image

@owaiskhan310 owaiskhan310 deleted the patch-1 branch June 16, 2025 07:30
@owaiskhan310
Copy link
Author

mistakenly opened this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant