Comments (6)
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.
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.
Hello, thanks for letting me know!
Are there plans on adding default.js the way they were described?
from next.js.
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.
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.
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)
- Cannot use Sharp in v15.0.0-canary.1 HOT 4
- NextJS 14 returns fetch failed with UND_ERR_CONNECT_TIMEOUT error on serverless function HOT 20
- enable swcMinify compression exception { toString, fromString } => {fromString} HOT 1
- Tailwind content for projects with "src" folder doesn't works HOT 1
- create-next-app v15 rc with --empty and src directory results in a broken tailwind.config.ts HOT 1
- vercel/styled-jsx error `DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.` HOT 1
- Build Error: Parsing css source code failed HOT 5
- Route Handlers Crash with bcrypt (see: #46493) HOT 5
- Forms example does not work with useActionState
- Failed to reload dynamic routes: Error: Catch-all must be the last part of the URL.
- static-export get searchParams is empty HOT 1
- static-export get searchParams is empty
- generateMetadata example not working HOT 1
- Use of deprecated dependency that leaks memory in `eslint-config-next` (inflight 1.0.6)
- 'next/dynamic' - SSR does not seem to work for dynamically imported components. HOT 1
- Duplicate Requests in Next.js 14 on Server Side with Parallel Routes and Intercepting Routes
- `router.replace()` on pages with query params cause entire page re-render on Next 14.2.3 HOT 1
- Form state not updating and suspended components reloading on first server action submission when using revalidatePath with loading.tsx in app router HOT 1
- `router.replace()` on pages with query params cause entire page re-render on Next 14.2.3 HOT 1
- Suspense boundary broken (ignored) after second server action call HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next.js.