Cory House @housecor.com · Jan 1

V0's system prompt specifies these naming and casing rules. I agree with all this. For years, I used PascalCase for React components. But I now I use kebab-case instead to avoid casing issues.

17 likes 5 replies

?

Replies

Diego! · Jan 1

Even tho I agree, I've never had casing issues. Is this a Windows specific thing?

Jan Aagaard · Jan 1

It might just be me, but I find that there is an extra mental load in having both 'user-profile' and 'UserProfile' to mean the same thing in the code base.

Bulstrode Whitelocke · Jan 2

One thing that I find really annoying about camelCase/PascalCase is the inconsistency of it. For example, when testing React Native components you can use the testID prop, and then use getByTestId (note lc ‘d’) in testing library. This wouldn’t be an issue with snake/kebab

Bulstrode Whitelocke · Jan 2

I generally follow language-specific conventions, but I always found snake case the most readable, and IDEs and editors generally prefer it to kebab-case (although you can obviously tweak settings nowadays). But in the languages I mostly code in - Typescript and PHP (PSR-2) it’s not kosher.

reichenwald · Jan 2

Where could PascalCase become an issue?