Skip to content

How do you create a text content with mixed html #21

Answered by Tao-VanJS
iongion asked this question in Q&A
Discussion options

You must be logged in to vote

The most straightforward way in VanJS is to use primitive-valued arguments (string, number, etc.) in tag functions to represent Text node. Thus as @artydev mentioned, the code generated with VanJS converter is pretty idiomatic.

That said, the solution mentioned in #21 (reply in thread) also works. VanJS is unopinionated thus you can choose the way you like as long as you have a good understanding of the behavior of the code :-)

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@iongion
Comment options

@artydev
Comment options

@iongion
Comment options

@artydev
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Tao-VanJS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants