Hello 👋 , I'm trying to pass a prop to the <script tag in a component.
Here is the component.astro:
---
interface Props {
containerName: string
}
const { containerName } = Astro.props as Props
---
<div class={containerName}></div>
<script>
console.log({ containerName })
</script>
In the console, the error is "Uncaught ReferenceError: containerName is not defined". Any hint on how to make this work? Thanks a lot!