Skip to content

Migration from Vue 2 doesn’t mention .sync modifier #764

Closed
@palant

Description

@palant

I figured this out from a code comment but “Migration from Vue 2” document doesn’t seem to mention this change: the .sync event modifier is gone and replaced by v-model argument. So what was <component :prop.sync="value"> with Vue 2, should be <component v-model:prop="value"> with Vue 3.

For reference, this is mentioned in the code here: https://github.com/vuejs/vue-next/blob/052a621762c5f7c420464747ebbbed27c7350593/packages/compiler-core/src/transforms/vBind.ts#L22

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions