Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadow endpoints don't invalidate on navigation when component stays mounted #3802

Closed
janosh opened this issue Feb 9, 2022 · 2 comments
Closed

Comments

@janosh
Copy link
Contributor

janosh commented Feb 9, 2022

Describe the bug

File [slug].svelte receives data from a get() endpoint in [slug].ts without explicit load function. When the route changes but the new route is also handled by [slug].svelte, the page does not update. Only a full page reload renders fresh data.

Reproduction

Navigate from

https://studenten-bilden-schueler.de/standorte/aachen

via nav to

https://studenten-bilden-schueler.de/standorte/augsburg.

Code at https://github.com/sbsev/svelte-site.

Logs

No response

System Info

System:
    OS: macOS 12.2
    CPU: (10) arm64 Apple M1 Pro
    Memory: 178.88 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 17.4.0 - /opt/homebrew/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.3.1 - /opt/homebrew/bin/npm
  Browsers:
    Brave Browser: 98.1.35.100
    Safari: 15.3
  npmPackages:
    @sveltejs/adapter-static: ^1.0.0-next.26 => 1.0.0-next.26 
    @sveltejs/kit: ^1.0.0-next.260 => 1.0.0-next.260 
    svelte: 3.46.4 => 3.46.4 
    vite: ^2.7.13 => 2.7.13

Severity

blocking an upgrade

Additional Information

I tried to invalidate the page with

import { afterNavigate, invalidate } from '$app/navigation'

afterNavigate(() => invalidate(slug))

but that has no effect.

@Conduitry
Copy link
Member

This sounds like a duplicate of #3727.

@janosh
Copy link
Contributor Author

janosh commented Feb 9, 2022

@Conduitry You're right, somehow I didn't find that issue.

@janosh janosh closed this as completed Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants