Skip to content

Support propsData #204

@lmiller1990

Description

@lmiller1990

I am moving a small code base to VTU v2. One of the main breaking changes is the change from propsData -> props in the mounting options.

Eg:

// VTU v1

const A = {
  props: ['msg']
}

mount(A, {
  propsData: { msg: 'msg' }
})

// VTU v2

mount(A, {
  props: { msg: 'msg' }
})

I'd like to allow propsData to work as well. I'd suggest we support both for migration purposes. We won't document propsData, since using props matches the props key in Vue components, but we will keep both for convenience.

The acceptance criteria for this PR are as follows:

  • support the propsData mounting method
  • pass whatever is received from propsData to props in src/mount.ts
  • add at least one tests with propsData

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions