Hello there, silly question here:
How do I make a button on my page that is able to dynamically add new Astro components?
I have created a player component, and a song component. I want the add button to add a player with that song.
//components/Player.astro
---
const { songSrc } = Astro.props;
const songUri = "http://mysupersecretip:3000/" + songSrc;
---
I could now simply add an event listener and manually recreate the component, but is there a better way?