leptos-rs / leptos

Build fast web applications with Rust.
https://leptos.dev
MIT License
16.29k stars 648 forks source link

No navigation to nested route when using RoutingProgress #3197

Closed TERRORW0LF closed 1 hour ago

TERRORW0LF commented 2 days ago

Describe the bug When navigating to a nested route neither the browser's url nor the page get updated when using a RoutingProgress in the app. Clicking the link to the nested route again displays the correct page. The same thing happens on the first navigation inside the nested route.

Leptos Dependencies

leptos = { version = "0.7.0-rc1", features = ["nightly"] }
leptos_axum = { version = "0.7.0-rc1", optional = true }
leptos_meta = { version = "0.7.0-rc1" }
leptos_router = { version = "0.7.0-rc1", features = ["nightly"] }

To Reproduce Steps to reproduce the behavior:

  1. Set up the router example in an start-axum-0.7 template (remove tracing and futures)
  2. Run cargo leptos watch
  3. Open the site and navigate to the about section
  4. Navigate to the contact section
  5. The browser still displays the about section and the RoutingProgress progress bar is stuck at fully completed

Expected behavior The navigation to the nested route completes after the first link click.

gbj commented 15 hours ago

I can only reproduce this if navigating to a page that 1) uses Suspense, but where 2) the navigation is immediately-ready (i.e., I remove the delay in the api.rs functions).

Is this the case for you? If not, could you provide a reproduction rather than the steps to reproduce based on the router example? I can probably fix this but I want to make sure it addresses your actual issue too.