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

$sync to update .sync props #9869

ralphchristianeclipse opened this Issue Apr 13, 2019 · 1 comment


None yet
2 participants
Copy link

ralphchristianeclipse commented Apr 13, 2019

What problem does this feature solve?

this will give us an internal api to use for updating sync props
$emit('update:nameOfPropToSync', val)

This will allow new users to have a certain structure for $sync and $emit so they will know that the prop is using the .sync modifier for the prop.

What does the proposed API look like?

  <modal modal.sync="modal" />
function sync(key, ...args) {
  this.$emit(`update:${key}`, ...args);
Vue.prototype.$sync = sync;

// using in a component

this.$sync('modal', false)

This comment has been minimized.

Copy link

posva commented Apr 13, 2019

I think it's better to not create an extra api that hides the original behavior. On top of that it's doable in userland

@posva posva closed this Apr 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.