luwanquan/babel-preset-vca-jsx

Support for custom directives arguments

longnh301 opened this issue · 2 comments

Add support for custom directive syntax similar to vCustomDirective[directive.args]={directive.value}

This does not match the JSX specification and is therefore not intended to be implemented.

If you need or are interested in it, you can implement it in a new project.
Otherwise, it is recommended that you use the expansion operator to pass the parameters.
like e.g.:

const directives = [
  { name: 'my-dir', value: 123, modifiers: { abc: true } }
]
return <div {...{ directives }}/>

Thank you, that's how I'm implementing it at the moment.