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

Using loading.tsx with [...catchall] route in the parallel route breaks the rendering completely #60682

Closed
1 task done
max-mayorov opened this issue Jan 15, 2024 · 4 comments · Fixed by #61597
Closed
1 task done
Labels
bug Issue was opened via the bug report template. locked

Comments

@max-mayorov
Copy link

Link to the code that reproduces this issue

https://github.com/max-mayorov/nextgram-loading-catchall-bug

To Reproduce

  1. Start the application in development: pnpm dev
  2. Click on any nav link on the top of the page:
    image

Current vs. Expected behavior

Expected:
About page opens, showing navigation buttons and page title (About, About Us, About Me)

Actual:
Nothing is loaded, white page

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
Binaries:
  Node: 18.18.2
  npm: N/A
  Yarn: N/A
  pnpm: 8.14.0
Relevant Packages:
  next: 14.0.5-canary.58
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A

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

App Router

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

next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)

Additional context

This incorrect behavior is related to the combination of

  • [...catchAll] route inside parallel route @modal to dismiss the modal
  • loading.tsx file inside affected pages.

Removing loading.tsx or [...catchAll] route can be a workaround fix the problem but in our project we need both of them unfortunately

@max-mayorov max-mayorov added the bug Issue was opened via the bug report template. label Jan 15, 2024
@icyJoseph
Copy link
Contributor

Just ran into this as well...

Experimenting with loading a component from a parallel route, and only that matching route, which could also potentially have lag while loading data, so I added catchAll and the loading file, but the UI crashes out.

@icyJoseph
Copy link
Contributor

icyJoseph commented Jan 16, 2024

Using a Suspense boundary around the data fetching areas, instead of a loading.tsx file, seems to do the trick. I'll test a bit more.

Though at that point I can just inline this component into the route I want to use it at...

@ztanner
Copy link
Member

ztanner commented Feb 14, 2024

Hi! Thanks for the report. I checked your code reproduction and confirmed it's been fixed by #61597. Let us know if you are still encountering any problems after upgrading!

Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants