I've tried the following with no luck, wanted to produce a <!-- Baz -->
comment node:
export default {
render() {
return (
<strong>
Foo
{/* Baz */}
</strong>
)
},
}
I've tried the following with no luck, wanted to produce a <!-- Baz -->
comment node:
export default {
render() {
return (
<strong>
Foo
{/* Baz */}
</strong>
)
},
}
Although it's not strictly JSX, I haven't better way to achieve this:
import { Comment, h } from 'vue'
export default {
render() {
return (
<strong>
Foo
{h(Comment, 'Baz')}
</strong>
)
},
}
This works <-- Baz -->
answer 2:
Babel transform will remove jsx comments,you can update your babel version, view this answer or you can use some hack