Miss any of our Open RFC calls?Watch the recordings here! »

@vue/babel-helper-vue-jsx-merge-props

1.0.0 • Public • Published

@vue/babel-helper-vue-jsx-merge-props

A package used internally by vue jsx transformer to merge props spread. It is required to merge some prop trees like this:

import mergeProps from '@vue/babel-helper-vue-jsx-merge-props'
 
const MyComponent = {
  render(h) {
    // original: <button onClick={$event => console.log($event)} {...{ on: { click: $event => doSomething($event) } }} />
    return h(
      'button',
      mergeProps([
        {
          on: {
            click: $event => console.log($event),
          },
        },
        {
          on: {
            click: $event => doSomething($event),
          },
        },
      ]),
    )
  },
}

This tool is used internally and there is no reason for you to ever use it.

Keywords

none

Install

npm i @vue/babel-helper-vue-jsx-merge-props

DownloadsWeekly Downloads

813,718

Version

1.0.0

License

MIT

Unpacked Size

2.83 kB

Total Files

3

Last publish

Collaborators

  • avatar
  • avatar
  • avatar