Como substituir strings por componentes do React
import { replaceReact } from "replace-react";
const MyApp = () => {
return (
<div>
{replaceReact("hello world", /(world)/g, (match, key) => (
<h1 key={key}>{match}</h1>
))}
</div>
);
};
Zealous Zebra