Skip to content

Commit feba680

Browse files
committed
[react] [readme] fix broken React doc links and Foo syntax error
1 parent 8ed1924 commit feba680

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

react/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This style guide is mostly based on the standards that are currently prevalent i
2525
## Basic Rules
2626

2727
- 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).
2929
- Always use JSX syntax.
3030
- Do not use `React.createElement` unless you’re initializing the app from a file that is not JSX.
3131
- [`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
7575

7676
## Mixins
7777

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).
7979

8080
> 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.
8181

@@ -454,7 +454,7 @@ We don’t recommend using indexes for keys if the order of items may change.
454454
- Spreading objects with known, explicit props. This can be particularly useful when testing React components with Mocha’s beforeEach construct.
455455

456456
```jsx
457-
export default function Foo {
457+
export default function Foo() {
458458
const props = {
459459
text: '',
460460
isPublished: false
@@ -735,7 +735,7 @@ We don’t recommend using indexes for keys if the order of items may change.
735735

736736
> Why? [`isMounted` is an anti-pattern][anti-pattern], is not available when using ES6 classes, and is on its way to being officially deprecated.
737737

738-
[anti-pattern]: https://facebook.github.io/react/blog/2015/12/16/ismounted-antipattern.html
738+
[anti-pattern]: https://legacy.reactjs.org/blog/2015/12/16/ismounted-antipattern.html
739739

740740
## Translation
741741

0 commit comments

Comments
 (0)