Skip to content

Update composition-api.md #3249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

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" />**
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant