Next.js Discord

Discord Forum

Best practice for naming component files in a Next.js 15

Unanswered
Yellow croaker posted this in #help-forum
Open in Discord
Yellow croakerOP
What is the best practice for naming component files in a Next.js 15 App Router project?

Should the file name follow a convention like ‘splash-screen.tsx’ (kebab-case) or ‘SplashScreen.tsx’ (PascalCase)?

I noticed that in the documentation, some files like button.tsx and not-found.tsx use kebab-case. How should we decide on the naming convention for component files?

2 Replies