vanjs-org / van

🍦 VanJS: World's smallest reactive UI framework. Incredibly Powerful, Insanely Small - Everyone can build a useful UI app in an hour.
https://vanjs.org
MIT License
3.77k stars 87 forks source link

Proposal for `str` tagged template literal #226

Closed Atmos4 closed 8 months ago

Atmos4 commented 8 months ago

Usage:

Do you like it? I can also add this separately in van-element, since this is useful for styling 😄

Tao-VanJS commented 8 months ago

I'm leaning towards to adding str as an extension function of van-element. As my own preference, I like the following way:

const Hello = (state1: State<number>, state2: State<string>, state3: State<number>) 
  => p("1: ", state1, ",2: ", state2, "3: ", state3)
Atmos4 commented 8 months ago

Makes sense! I am going to go ahead and close this then 👌 I might implement this in van-element