how to replace strings with react components code example
Example: how to replace strings with react components
import { replaceReact } from "replace-react";
const MyApp = () => {
return (
{replaceReact("hello world", /(world)/g, (match, key) => (
{match}
))}
);
};