mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
[guide] [react] add missing PascalCase guidance for prop names
This commit is contained in:
@@ -267,7 +267,7 @@ This style guide is mostly based on the standards that are currently prevalent i
|
||||
|
||||
## Props
|
||||
|
||||
- Always use camelCase for prop names.
|
||||
- Always use camelCase for prop names, or PascalCase if the prop value is a React component.
|
||||
|
||||
```jsx
|
||||
// bad
|
||||
@@ -280,6 +280,7 @@ This style guide is mostly based on the standards that are currently prevalent i
|
||||
<Foo
|
||||
userName="hello"
|
||||
phoneNumber={12345678}
|
||||
Component={SomeComponent}
|
||||
/>
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user