Custom "special files" in app router
Answered
Petit Bleu de Gascogne posted this in #help-forum
Petit Bleu de GascogneOP
Hi there,
I was wondering if it would be possible to create custom "special files" like layout.{js,jsx,ts,tsx}?
Example use-case:
Creating a
Or
Creating a
I was wondering if it would be possible to create custom "special files" like layout.{js,jsx,ts,tsx}?
Example use-case:
Creating a
breadcrumb.tsx
file on each route which gets joined and rendered in a specific slot in the root layout. Or
Creating a
sidebar.tsx
on some routes to automatically create an entry within a sidebar component within the root layout.Answered by joulev
right now it is not possible though that would be quite a cool feature
2 Replies
@Petit Bleu de Gascogne Hi there,
I was wondering if it would be possible to create custom "special files" like layout.{js,jsx,ts,tsx}?
Example use-case:
Creating a `breadcrumb.tsx` file on each route which gets joined and rendered in a specific slot in the root layout.
Or
Creating a `sidebar.tsx` on some routes to automatically create an entry within a sidebar component within the root layout.
right now it is not possible though that would be quite a cool feature
Answer
Petit Bleu de GascogneOP
I've opened a feature request on GH for this:
https://github.com/vercel/next.js/discussions/74308#discussion-7745551
https://github.com/vercel/next.js/discussions/74308#discussion-7745551