Code Monkey home page Code Monkey logo

Comments (3)

ztanner avatar ztanner commented on June 20, 2024

Hi @V01D-NULL

I believe this is because your parallel slot is defined at the foo level, not at the root level. In this case, the parallel route would be passed as a prop to app/foo/layout.tsx (if it existed), rather than app/layout.tsx.

If you create a app/foo/layout.tsx file that looks like this, it should work as you expect!

export default function Layout({ children, modal }) {
  return (
    <>
      {children}
      {modal}
    </>
  );
}

from next.js.

V01D-NULL avatar V01D-NULL commented on June 20, 2024

@ztanner

You're right that did help, our production env has this too I must have missed it while creating this poc.
The issue I'm seeing on production is intermittent, sometimes the intercepted renders a modal, sometimes it doesn't. Using just a Link component for that..

Does this sound familiar at all?
This was my best shot at trying to replicate the behavior I saw, due to the volatile nature of the bug I'm seeing I was unable to create a standalone reproduction

from next.js.

ztanner avatar ztanner commented on June 20, 2024

@V01D-NULL I'm afraid it's hard to say without seeing the source. You might be able to debug the behavior a bit better if you add a catch-all slot to your interception route (ie, @slot/[...catchAll]/page.tsx) as well as a root page (ie @slot/page.tsx) and have them render some debug code. This might help diagnose if your interception route is being matched to the wrong page component.

from next.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.