Skip to content

Change emit example function name for clarity #2050

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

Merged
merged 2 commits into from
Oct 29, 2022

Conversation

bbaustin
Copy link
Contributor

Description of Problem

As-is, I did not immediately see the connection between this.$emit('submit') and the following code, <MyComponent @some-event="callback" /> in the "component instance" example

Proposed Solution

I suggest changing the function name from submit to someEvent (and also possibly adding some extra HTML example code for added clarity)

Additional Information

I'm just learning Vue and was a little confused by this section in the docs. It's very possible I'm still confused, in which case, please disregard :)

Hello,

I suggest changing the function name in the "component instance" example from `submit` to `someEvent` (and also possibly adding some extra HTML example code for added clarity)

As-is, I did not immediately see the connection between "submit" and the following code, which references "some-event"

I'm just learning Vue and was a little confused by this section in the docs. It's very possible I'm still confused, in which case, please disregard :)
@netlify
Copy link

netlify bot commented Oct 26, 2022

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit c0c46f8
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/635ce0eb13f512000814b4c1
😎 Deploy Preview https://deploy-preview-2050--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 site settings.

Copy link
Contributor

@skirtles-code skirtles-code left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I agree that the event name should be changed to match the surrounding examples. The sudden switch to submit just makes it confusing.

I don't think we need the extra template snippet though. How the submit() method gets called isn't really relevant to the point being made.

@bbaustin
Copy link
Contributor Author

I don't think we need the extra template snippet though. How the submit() method gets called isn't really relevant to the point being made.

Sure, that makes sense. I made another commit to remove the snippet!

@skirtles-code skirtles-code merged commit 1f0490f into vuejs:main Oct 29, 2022
Alex-Sokolov referenced this pull request in vuejs-translations/docs-ru Oct 29, 2022
* Change emit example function name for clarity

Hello,

I suggest changing the function name in the "component instance" example from `submit` to `someEvent` (and also possibly adding some extra HTML example code for added clarity)

As-is, I did not immediately see the connection between "submit" and the following code, which references "some-event"

I'm just learning Vue and was a little confused by this section in the docs. It's very possible I'm still confused, in which case, please disregard :)

* Remove template snippet
@bbaustin bbaustin deleted the patch-1 branch October 29, 2022 16:39
Alex-Sokolov referenced this pull request in vuejs-translations/docs-ru Oct 29, 2022
* Change emit example function name for clarity

Hello,

I suggest changing the function name in the "component instance" example from `submit` to `someEvent` (and also possibly adding some extra HTML example code for added clarity)

As-is, I did not immediately see the connection between "submit" and the following code, which references "some-event"

I'm just learning Vue and was a little confused by this section in the docs. It's very possible I'm still confused, in which case, please disregard :)

* Remove template snippet

Co-authored-by: Ben <ben.austin@melodysquare.com>
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.

2 participants