File naming conventions in reactJS?

前端 未结 7 1691
甜味超标
甜味超标 2020-12-23 15:43

Recently I have started learning ReactJS, the only thing that confuses me is how to name folders and files in the react app directory.

To n

7条回答
  •  伪装坚强ぢ
    2020-12-23 16:36

    According to Eloquent Javascript. Classes follow TitleCase, and method / functions and properties follow camelCase. It is also said directories and components follow all lowercase naming. It is just preferred way of naming and popular or convention in so many programming languages including C, C++, and Java.

    However, Javascript is a wild language and there is no exact rule to follow for naming, and there is only preference. As long as naming is easily readable and consistent in entire module/component/project and it does not confuse other developers, and it is totally up to you how to name them.

提交回复
热议问题