> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cuprice.io/llms.txt
> Use this file to discover all available pages before exploring further.

# React

> Embed Cuprice in a React app (Vite, CRA, Remix)

Load the script dynamically in a `useEffect`:

```tsx theme={null}
import { useEffect } from "react";

export default function Pricing() {
  useEffect(() => {
    const script = document.createElement("script");
    script.src = "https://app.cuprice.io/embed.js";
    script.async = true;
    document.body.appendChild(script);

    return () => {
      document.body.removeChild(script);
    };
  }, []);

  return <div data-cuprice-id="YOUR_SHARE_ID" />;
}
```

<Warning>
  Make sure the cleanup function removes the script on unmount to avoid duplicates if the component re-mounts.
</Warning>
