Making sure Astro client-side scripts load while navigating? #976
-
Describe your problem 🧐In the CodeSandbox demo below, the client-side script in Steps to reproduceOpen the demo preview on CodeSandbox, then click the link titled "Page 2" on the top. You'll observe that the button on the page is not interactive.What is your question? 🙋♀️How do I make sure client-side scripts in Astro load while navigating between pages? URL to minimal reproduction 🔗https://codesandbox.io/p/devbox/swup-astro-934yyd Checked all these? 📚
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
I'm afraid I can't really help here as I have
That way, I don't need any manual intervention – components initialize themselves automatically as soon as they are rendered. Re-reading the related paragraph on the
Still, I don't really understand why your example is not working. Let's see if anyone else can chime in and shed some light on this. |
Beta Was this translation helpful? Give feedback.
-
|
Looking at the project's source, this should definitely work. Trouble is I can't get it to run :/ The CodeSandbox either crashes or runs out of memory... |
Beta Was this translation helpful? Give feedback.
@daun Thanks for following up, but I've switched to using Astro's built-in view transitions API which serves my needs well for now.