cara mengganti string dengan komponen reaksi

import { replaceReact } from "replace-react";

const MyApp = () => {
  return (
    <div>
      {replaceReact("hello world", /(world)/g, (match, key) => (
        <h1 key={key}>{match}</h1>
      ))}
    </div>
  );
};
Zealous Zebra