Skip to content

Commit 95286eb

Browse files
Rahil Voraljharb
authored andcommitted
[guide] [react] add note about forbid-prop-types rule
1 parent 070e620 commit 95286eb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

react/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This style guide is mostly based on the standards that are currently prevalent i
2828
- However, multiple [Stateless, or Pure, Components](https://facebook.github.io/react/docs/reusable-components.html#stateless-functions) are allowed per file. eslint: [`react/no-multi-comp`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md#ignorestateless).
2929
- Always use JSX syntax.
3030
- Do not use `React.createElement` unless you’re initializing the app from a file that is not JSX.
31+
- [`react/forbid-prod-types`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md) will allow `arrays` and `objects` only if it is explicitly noted what `array` and `object` contains, using `arrayOf`, `objectOf`, or `shape`.
3132

3233
## Class vs `React.createClass` vs stateless
3334

0 commit comments

Comments
 (0)