Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

863
Visualizações
File naming conventions in reactJS?

Recently, I have started learning ReactJS. The only thing that confuses me is naming folders and files in the React app directory.

  • To name component files, some people follow TitleCase.js and some follow camelCase.js.

  • To name app directories, few people follow camelCase and few smallcase or small-case.

I tried to find the official documentation on naming conventions but couldn't. Can someone help me find the right way of naming files in ReactJS?

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Regarding naming conventions, ReactJS is unopinionated.

There isn't an official guideline or statement about the questions you raised. You won't find them in the documentation either.

It's a personal (team) preference. If you struggle to enforce one, you could stick to something like Airbnb's mostly reasonable approach to React and JSX.

PS: As long as you're consistent, I would say you're safe.

over 4 years ago · Santiago Trujillo Relatório

0

Based on 'Google JavaScript Style Guide'

File names must be all lowercase and may include underscores (_) or dashes (-), but no additional punctuation. Follow the convention that your project uses. Filenames’ extension must be .js.

over 4 years ago · Santiago Trujillo Relatório

0

As others have mentioned, we adopted the Airbnb style guide. Here is the specific section in their docs about naming conventions:

https://github.com/airbnb/javascript/tree/master/react#naming

tl;dr PascalCase for naming

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda