From 95286eb496acf09fb8360d5368f798b040a0b5c1 Mon Sep 17 00:00:00 2001 From: Rahil Vora Date: Mon, 7 Jan 2019 10:24:16 -0600 Subject: [PATCH] [guide] [react] add note about `forbid-prop-types` rule --- react/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/react/README.md b/react/README.md index 8ec7a923..542aa1fd 100644 --- a/react/README.md +++ b/react/README.md @@ -28,6 +28,7 @@ This style guide is mostly based on the standards that are currently prevalent i - 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). - Always use JSX syntax. - Do not use `React.createElement` unless you’re initializing the app from a file that is not JSX. + - [`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`. ## Class vs `React.createClass` vs stateless