Code Monkey home page Code Monkey logo

Comments (6)

aparx avatar aparx commented on June 20, 2024 1

Hey Tanner,

I have a dashboard with three different parallel routes being displayed side by side. Some containing route params up to two directories deep. For some slots I need a default.js on different levels, to be able to use the supplied route parameters. I reckon I'm going to have to use normal pages, but the issue is they refetch on some soft navigation changes and also I'll kinda have to spam them in multiple places to get the desired behaviour, which is something I don't particularly want. I'm pretty certain I'll find a workaround that fits more with Next's design and concepts.

So thanks for helping and good luck down the road.

from next.js.

ztanner avatar ztanner commented on June 20, 2024

Apologies for the confusion @aparx , the docs are outdated here and I'll work on a PR to fix them.

Parallel routes currently only support a single default for the slot, and that default should be defined at the root of the slot. The params it receives would be for the dynamic segments leading up to it.

from next.js.

aparx avatar aparx commented on June 20, 2024

Hello, thanks for letting me know!

Are there plans on adding default.js the way they were described?

from next.js.

ztanner avatar ztanner commented on June 20, 2024

Hi @aparx -- there are not currently plans for this. Could you clarify a bit more what your desired behavior / use-case is? I could perhaps provide an alternate suggestion.

from next.js.

frankievx avatar frankievx commented on June 20, 2024

Hey Tanner,

I have a dashboard with three different parallel routes being displayed side by side. Some containing route params up to two directories deep. For some slots I need a default.js on different levels, to be able to use the supplied route parameters. I reckon I'm going to have to use normal pages, but the issue is they refetch on some soft navigation changes and also I'll kinda have to spam them in multiple places to get the desired behaviour, which is something I don't particularly want. I'm pretty certain I'll find a workaround that fits more with Next's design and concepts.

So thanks for helping and good luck down the road.

I'm also interested in this functionality and the ability to have deeply nested slots that run code. My use case is essentially when I'm working on React Three Fiber projects I like to have the canvas and the webgl layer as a slot and then html on the main routes. This separation allows me to organize my react three fiber code effectively and in parallel with the html code.

from next.js.

github-actions avatar github-actions commented on June 20, 2024

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.

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.