I have a list of words, such as:
["Foo","Bar"]
When presented with a string, I'd like to dynamically replace words found in the list with components. Given a string like this:
"Foo lorem ipsum dolor Bar."
The result would be:
<MyComponent :text="Foo"/> lorem ipsum dolor <MyComponent :text="Bar"/>.
What's the best way to achieve this?