Next.js Discord

Discord Forum

Parallel slots cannot use kebab case

Answered
Wuchang bream posted this in #help-forum
Open in Discord
Wuchang breamOP
We are facing the same problem of not building when we use the kabab case name @home-public like this.

And we need this. Do you know how we can handle this issue?

[Repository](https://github.com/edust-org/edust)

[vercel/nextjs issue](https://github.com/vercel/next.js/issues/56330)
Answered by Losti!
You can't do this because it becomes a React.ReactNode named after the parallel route or parallel slot (whatever you want to call it). Adding "-" would result in your layout setting being home-public as the prop.
View full answer

5 Replies

@Wuchang bream We are facing the same problem of not building when we use the kabab case name `@home-public` like this. And we need this. Do you know how we can handle this issue? [Repository](https://github.com/edust-org/edust) [vercel/nextjs issue](https://github.com/vercel/next.js/issues/56330)
You can't do this because it becomes a React.ReactNode named after the parallel route or parallel slot (whatever you want to call it). Adding "-" would result in your layout setting being home-public as the prop.
Answer
As you know, you can't use hyphens like that, only underscores "_".
The above is based on my understanding; I suggest you try home_public. If you want to use home-public, you can create a plugin that supports it and transform the result into homePublic as a prop or home_public as a prop in your layout.
I'm in the middle of the game so it was an improvised answer.
Wuchang breamOP
Thank you for your answer.