Skip to content

[react] [readme] Fix broken documentation links and syntax error in code example - #3304

Open
mohit-nayak wants to merge 1 commit into
airbnb:masterfrom
mohit-nayak:fix/react-readme-broken-links
Open

[react] [readme] Fix broken documentation links and syntax error in code example#3304
mohit-nayak wants to merge 1 commit into
airbnb:masterfrom
mohit-nayak:fix/react-readme-broken-links

Conversation

@mohit-nayak

Copy link
Copy Markdown

Fixes #3303

The React/JSX Style Guide had 3 dead external links and 1 syntax error in a code example.

Broken links

All three facebook.github.io/react URLs return 404. React's legacy docs and blog now live at legacy.reactjs.org.

Line Before After
28 facebook.github.io/react/docs/reusable-components.html#stateless-functions legacy.reactjs.org/docs/components-and-props.html#function-and-class-components
78 facebook.github.io/react/blog/2016/07/13/mixins-considered-harmful.html legacy.reactjs.org/blog/2016/07/13/mixins-considered-harmful.html
738 facebook.github.io/react/blog/2015/12/16/ismounted-antipattern.html legacy.reactjs.org/blog/2015/12/16/ismounted-antipattern.html

A note on line 28: the issue suggested legacy.reactjs.org/docs/react-without-es6.html, but that page is about createReactClass, not stateless function components. The old reusable-components.html#stateless-functions content was folded into components-and-props.html, so I pointed at the #function-and-class-components anchor there instead, which is what the sentence is actually referring to.

All replacements kept on legacy.reactjs.org rather than react.dev for consistency, since the two blog posts only exist on legacy and the surrounding guide is still written against class-component-era React.

Syntax error

The "Spreading objects with known, explicit props" example (line 457) was missing the parameter parentheses, so it would not parse:

// before
export default function Foo {

// after
export default function Foo() {

Verified all replacement URLs return HTTP 200.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[react] [readme] Fix broken documentation links and syntax error in code example

1 participant