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

Parallel Routes Loading UI Displaying Parent Loading #65270

Open
bradleymcleish opened this issue May 2, 2024 · 1 comment
Open

Parallel Routes Loading UI Displaying Parent Loading #65270

bradleymcleish opened this issue May 2, 2024 · 1 comment
Labels
bug Issue was opened via the bug report template. Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.

Comments

@bradleymcleish
Copy link

bradleymcleish commented May 2, 2024

Link to the code that reproduces this issue

https://github.com/bradleymcleish/parallel-loading-issue

To Reproduce

  1. Start the Application
  2. Click on the Users link on the page
  3. See that for a moment the loading UI for the page displays both on the left and on the right in the parallel route slot
  4. This flicker happens on various different occasions including on router back

Current vs. Expected behavior

The loading UI for the current route displays for a moment in a flicker in the parallel route position. The loading UI should not show twice and it should not show in the parallel route position when navigating to the page with the parallel route not open/showing

Furthermore, even when having a Loading file in @Drawer that returns null the loading flicker still occurs

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Thu Jan 11 04:09:03 UTC 2024
  Available memory (MB): 15803
  Available CPU cores: 16
Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Parallel & Intercepting Routes

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local)

Additional context

No response

@bradleymcleish bradleymcleish added the bug Issue was opened via the bug report template. label May 2, 2024
@github-actions github-actions bot added the Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. label May 2, 2024
@zsombor-guti
Copy link

Can confirm, it also happens with full page routes (ie. having the routes /posts and /posts/123, when accessing the latter, the loading.js of the former gets displayed, then a flicker and the loading.js file of the latter gets displayed until the data is loaded).

Tested on both 14.1.4 and 14.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.
Projects
None yet
Development

No branches or pull requests

2 participants