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

Easy two-way binding between v-model and vuex? #2141

Open
maerf opened this issue Mar 8, 2022 · 0 comments
Open

Easy two-way binding between v-model and vuex? #2141

maerf opened this issue Mar 8, 2022 · 0 comments

Comments

@maerf
Copy link

maerf commented Mar 8, 2022

What problem does this feature solve?

Is there any solution for quick low-/no-overhead databinding to something like a store object? Implemented? Library suicide pact?

All this boilerplate code just to set up two-way data binding is abomination.Maybe it's too late already, looking at popularity graphs. Anyone that watches a tutorial on databinding with vuex will surely have puked and ran away. It's a shame.

If there is no better concept, just create all these mindless getter setter and mutator methods IMPLICITLY unless definedI. I perhaps fail to understand how that is not better in any case (if properly communicated that this happens).

I think C# does something similar:

C# property sample:
public int Age { get; set; }

Is the same as:
private int age;
public int Age
{
public get { return this.age; }
public set { this.age = value; }
}

Btw, if you want read only, in C# you can make the setter private for example:
public string Age { get; private set; }

Works since 2012 or so. But what do they know about creating a popular language.

What does the proposed API look like?

Simply generate the default boilerplate getter setters and mutations (on build), if the user doesn't define any.

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

No branches or pull requests

1 participant