- 最終更新
- 2026/08/17
3秒でわかる
単語の先頭をすべて大文字にして続けて書く命名規則。クラスや React コンポーネントの名前に使われ、変数名との見分けを付ける役割を持ちます。
30秒図解
もう少し詳しく
どういうものか
複数のUserProfile、HttpRequest、OrderService のような
多くの
なぜ必要か
読む側が、User とuser なら
React では、
具体例
同じ
// 型とクラスは先頭大文字
interface UserProfile {
displayName: string;
createdAt: Date;
}
class OrderService {
// メソッドと変数は先頭小文字
private cachedOrders: UserProfile[] = [];
findByEmail(emailAddress: string) {
return this.cachedOrders;
}
}
// React コンポーネントも先頭大文字
function ProfileCard({ user }: { user: UserProfile }) {
return <div>{user.displayName}</div>;
}class OrderService: # クラスは先頭大文字
MAX_RETRY = 3 # 定数は大文字とアンダースコア
def find_by_email(self, email_address): # 関数と変数はスネークケース
return []つまずきやすいところ
略語のHTTPRequest と HttpRequest は
ファイル名とのProfileCard.tsx のように、
似た用語との違い
| 書き方 | 例 | 主な用途 |
|---|---|---|
| パスカルケース | UserProfile | クラス、 |
| キャメルケース | userProfile | 変数、 |
| スネークケース | user_profile | Python の |
| ケバブケース | user-profile | URL、 |
覚え方
ラクダの


