Open khmyznikov opened 1 year ago
But in reality, it's the only way to not have full page refresh by clicking on routes links in Lit.
It should not be.
This code should catch all <a>
clicks and do non-reload route change.
If you subscribed to store, but these events don’t call, please debug it https://github.com/nanostores/router/blob/main/index.js#L215-L218
From the FAQ: If you need to change URL programmatically you can use openPage or redirectPage
But in reality, it's the only way to not have full page refresh by clicking on routes links in Lit. It's on purpose or it's a bug?
This is the solution I have ended with to workaround:
<a href="/map" @click="${($event: Event) => { openRoute($event, 'map') }}" title="map">