How to customize interpolation rendering in Vue 3? #12879
Replies: 2 comments 4 replies
-
I guess you might be wanting a more abstract https://github.com/unifiedjs/unified https://github.com/syntax-tree/hast-util-to-jsx-runtime |
Beta Was this translation helpful? Give feedback.
-
The official Vue docs contain an example for an animated number: https://vuejs.org/guide/extras/animation#animating-with-watchers. It doesn't use custom rendering techniques, instead it passes a reactive object to an animation library. Does that cover your use case? |
Beta Was this translation helpful? Give feedback.
-
React Example
In React, components can handle children rendering directly:
Current Vue Behavior
In Vue 3, interpolation is always compiled to
_toDisplayString
:Question
Is it possible to achieve similar behavior in Vue where components can control how interpolated content is rendered?
For example, I'd like to do:
Any suggestions or insights would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions