Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I've tried the following with no luck, wanted to produce a <!-- Baz --> comment node:
<!-- Baz -->
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> ) }, }
Add a comment
This works <-- Baz -->
<-- Baz -->
answer 2:
Babel transform will remove jsx comments,you can update your babel version, view this answer or you can use some hack
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
<!-- Baz -->comment node in the DOM tree, trailing comma is a preference thing.