# toComponentEmbedScript

`function` in `discord-component-embed` · v0.1.0

<https://docs.seedcord.org/packages/discord-component-embed/0.1.0/functions/to-component-embed-script>

Returns the `<script>` tag Discord reads for a component embed, as an HTML string. Use it in a framework other than React, where you write raw HTML into the page yourself.

```ts
toComponentEmbedScript(root: ReactElement): string
```

Returns the `<script>` tag Discord reads for a component embed, as an HTML string. Use it in a framework other than React, where you write raw HTML into the page yourself.

Parameters.

- `root` `ReactElement`

Returns `string`.
