babel-plugin-transform-vue-jsx icon indicating copy to clipboard operation
babel-plugin-transform-vue-jsx copied to clipboard

h function transformed parameters are wrong

Open decadef20 opened this issue 7 years ago • 1 comments

I am using tsx + Vue; Here are my original code like this :

render(h:createElement){
  return  <div>
            <div>dfsd</div>
          </div>
}

transformed to

return h("div", undefined, h("div", undefined, "dfsd"));

It should be

return h("div", undefined, [h("div", undefined, "dfsd")]);

am I right?

decadef20 avatar Feb 09 '18 07:02 decadef20

Any update on this? Nesting multiple divs does not work with out this. Seems to render only first layer. According to docs the 3 property should be a string or array, not h. https://vuejs.org/v2/guide/render-function.html#createElement-Arguments

smitt04 avatar May 22 '18 21:05 smitt04