You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: react/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ This style guide is mostly based on the standards that are currently prevalent i
25
25
## Basic Rules
26
26
27
27
- Only include one React component per file.
28
-
- 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/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md#ignorestateless).
28
+
- However, multiple [Stateless, or Pure, Components](https://legacy.reactjs.org/docs/components-and-props.html#function-and-class-components) are allowed per file. eslint: [`react/no-multi-comp`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md#ignorestateless).
29
29
- Always use JSX syntax.
30
30
- Do not use `React.createElement` unless you’re initializing the app from a file that is not JSX.
31
31
-[`react/forbid-prop-types`](https://github.com/jsx-eslint/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`.
@@ -75,7 +75,7 @@ This style guide is mostly based on the standards that are currently prevalent i
75
75
76
76
## Mixins
77
77
78
-
- [Do not use mixins](https://facebook.github.io/react/blog/2016/07/13/mixins-considered-harmful.html).
78
+
- [Do not use mixins](https://legacy.reactjs.org/blog/2016/07/13/mixins-considered-harmful.html).
79
79
80
80
> Why? Mixins introduce implicit dependencies, cause name clashes, and cause snowballing complexity. Most use cases for mixins can be accomplished in better ways via components, higher-order components, or utility modules.
81
81
@@ -454,7 +454,7 @@ We don’t recommend using indexes for keys if the order of items may change.
454
454
- Spreading objects with known, explicit props. This can be particularly useful when testing React components with Mocha’s beforeEach construct.
455
455
456
456
```jsx
457
-
export default function Foo {
457
+
export default function Foo() {
458
458
const props = {
459
459
text: '',
460
460
isPublished: false
@@ -735,7 +735,7 @@ We don’t recommend using indexes for keys if the order of items may change.
735
735
736
736
> Why? [`isMounted` is an anti-pattern][anti-pattern], is not available when using ES6 classes, and is on its way to being officially deprecated.
0 commit comments