x-interpolate #1708
Replies: 3 comments 5 replies
-
There is probably a better name than "interpolate". It could maybe be an option on x-text, like <h1 x-data="{ n: 1 }" @click="n++" x-text.replace>Hello, #${n}</h1> |
Beta Was this translation helpful? Give feedback.
-
I don't think |
Beta Was this translation helpful? Give feedback.
-
One more thought. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem: x-text is great for replace all text, but a pain when you only want to replace a subset:
Solution: x-interpolate
Code for the plugin:
What do y'all think?
CodePen: https://codepen.io/carlmjohnson/pen/QWvbeLZ
Beta Was this translation helpful? Give feedback.
All reactions