Skip to content
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

docs: fix typo - count should be model #2749

Merged
merged 2 commits into from Mar 17, 2024

Conversation

EtherNoteWorld
Copy link
Contributor

Description of Problem

When I read the documentation, I am unclear about the source of this count.

Proposed Solution

Additional Information

Copy link

netlify bot commented Mar 13, 2024

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit dec7a37
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/65f28c4e92686800081033f8
😎 Deploy Preview https://deploy-preview-2749--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 configuration.

@brc-dd
Copy link
Member

brc-dd commented Mar 13, 2024

Actually, the name doesn't matter in parent component. It can be count, foo, bar or anything else. This change might be bit confusing for new users as they might think that the variable name should be model too. I'm fine with either one though.

@AloisSeckar
Copy link
Contributor

AloisSeckar commented Mar 13, 2024

As an occasional contributor I object against this chage as it goes against clean code principles. Naming the variable model makes sense inside the component itself, because there it has clear purpose - it "models the actual data value for this component". But from parent's perspective you want to know, what data you are passing to your child, what they represent. Therefore count makes sense, if you are displaying, let's say amount items in shoping cart, but model is nothing. If you use two child components, will you name your variables model1 and model2? How about having ten children?

But maybe we should make clearer, why count is used. I will think about some wording, if noone else does.

@bencodezen
Copy link
Member

Agreed with @AloisSeckar. I'll propose some changes in the PR to accommodate the general momentum we seem to be heading on.

Copy link
Member

@bencodezen bencodezen left a comment

Choose a reason for hiding this comment

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

Naming the model model can lead to future confusion. Suggesting changes shortly.

@NataliaTepluhina NataliaTepluhina merged commit 90ed831 into vuejs:main Mar 17, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants