Subscribe on changes!

Inconsistent behavior in `h` when there is only one non-string, non-number variadic child.

avatar
Aug 9th 2021

Version

3.2.0-beta.8

Reproduction link

https://codesandbox.io/s/relaxed-kare-kmkgb?file=/src/App.vue

image

Steps to reproduce

follow the link

What is expected?

show nothing

What is actually happening?

show false

avatar
Aug 9th 2021

This will make jsx behaviors wired.

<div>{false}{false}</div>
<div>{false}</div>

will show different result.

avatar
Aug 9th 2021

I can see the argument but changing it would technically be a breaking change.

The JSX transform seems to compile both to array children and should not be affected: https://vue-next-jsx-explorer.netlify.app/#%3C%3E%0A%20%20%3Cdiv%3E%7Bfalse%7D%7Bfalse%7D%3C%2Fdiv%3E%0A%20%20%3Cdiv%3E%7Bfalse%7D%3C%2Fdiv%3E%0A%3C%2F%3E

avatar
Aug 10th 2021

I can see the argument but changing it would technically be a breaking change.

The JSX transform seems to compile both to array children and should not be affected: https://vue-next-jsx-explorer.netlify.app/#%3C%3E%0A%20%20%3Cdiv%3E%7Bfalse%7D%7Bfalse%7D%3C%2Fdiv%3E%0A%20%20%3Cdiv%3E%7Bfalse%7D%3C%2Fdiv%3E%0A%3C%2F%3E

I'm using vanilla tsx😂.