Open obask opened 1 year ago
Hi, I'm using astro-spa in my project and it is working fine, I guess astro-spa has some problems working in codesandbox. Have you tried it on your machine?
I tried all combinations: my own project didn't work, this downloaded example too. Maybe the problem was caused by me using "npm run dev" version of Astro, but I gave up after not being able to find a single working example.
run dev
and start
does exactly the same. I've created simple example, try this out astro-spa-example
Thank you for providing an example, I really appreciate that!
Is asto-spa
behaves like a static site by default? Here is my network tab on the first load(it prefetched all links 2 times):
(I added a heavy chunk of html on page C) When I navigate between link it only loads 2kb of css, and doesn't update content.
function getCurrentTimestamp() {
var today = new Date();
return today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
}
---
<Layout title="C">
<main>
<p>{getCurrentTimestamp()}</p>
This time doesn't change unless I comment out the SPA plugin...
*I also tried using data saver by setting <Spa limit=1
, but it just makes it act like a regular MPA:
I'm going to stick to an experimental feature of Solid for now https://solid-hn-islands.netlify.app/ I found it in this article Here is what I expected to see when I click on page C:
Hi! I tried this example with a new version of Astro and it seems to be broken. https://codesandbox.io/s/enteleform-test--astro-spa--partial-update-ebbbf7