Which naming conventions should we use for a component in a variable? #136
Unanswered
rotarymars
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
lintで対応できるか分かりませんが、私はパスカルケースを用いた方が良いと思います。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, most variables are required to follow camelCase(except consts in lib/constants.ts).
However, we sometimes copy components on a variable, like
const TestComponent = memo(TestComponentBase).However, this fails the lint, because all variables should follow camelCase.
But react requires components to be PascalCased, which creates a conflict.
Beta Was this translation helpful? Give feedback.
All reactions