protonemedia / laravel-splade

💫 The magic of Inertia.js with the simplicity of Blade 💫 - Splade provides a super easy way to build Single Page Applications (SPA) using standard Laravel Blade templates, and sparkle it to make it interactive. All without ever leaving Blade.
https://splade.dev
MIT License
1.47k stars 109 forks source link

Defer component with infinite polling #534

Open lucassdoro opened 10 months ago

lucassdoro commented 10 months ago

Description:

Whenever I try to use the Defer component with polling and switch pages, the polling continues to run endlessly as if the previous page still existed.

Steps To Reproduce Issue:

  1. Create 3 pages.
  2. On the first page, add a component with <x-splade-defer accept="application/json" url="url" poll="5000"></x-splade-defer>.
  3. Leave the other page blank.
  4. On the initial page, add links to the other two pages using the Link component.
  5. When switching to the blank page, you will notice that the request continues to be made.