I'm setting up a react project with my team that will use mobX as state manager, plus typescript.
We are having a discussion about the casing of the files and folders.
So, while I've read that React project structure is unopinionated, the fact is that most of the time I use and see this pattern everywhere (for React Projects):
- Every file and folder non-react: camelCase or kebab-case
- All react related stuff inside
componentsfolder: PascalCase
Almost every article and project I see uses this rules.
So while unopinionated it seems that informally there is a convention.
Now the problem is that while I argue that we use that to identify easily React components and related files, and so I'm "forced" to say the argument that this is an informal react naming convention. And it can be useful for React developers to identify components and a structure there.
On the other side of the argument, some of my team members say that we should have a uniform, clear and linear naming convention, if not we will have a confusing naming structure. And ask why we should have an exception to React components. Because non-react developers might be more confused about the naming convention and structure.
While for me it seems acceptable to use a different casing convention depending on types of files/context, I can also see their point.
We agreed to try to get some feedback on this.
So any thoughts on this issue?
Thank you in advance.
from Folder/file casing on a React project
No comments:
Post a Comment