镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Closed

Description

@codeCraft-Ritik

Description

The React/JSX Style Guide (react/README.md) contains 3 broken external links and 1 syntax error in a code example.

Broken Links (all return HTTP 404)

All three facebook.github.io/react URLs are dead — React's docs moved to react.dev and the legacy blog content is now at legacy.reactjs.org.

Line Broken URL Status
28 https://facebook.github.io/react/docs/reusable-components.html#stateless-functions ❌ 404
78 https://facebook.github.io/react/blog/2016/07/13/mixins-considered-harmful.html ❌ 404
738 https://facebook.github.io/react/blog/2015/12/16/ismounted-antipattern.html ❌ 404

Working replacements (verified):

  • legacy.reactjs.org/docs/react-without-es6.html ✅ 200
  • legacy.reactjs.org/blog/2016/07/13/mixins-considered-harmful.html ✅ 200
  • legacy.reactjs.org/blog/2015/12/16/ismounted-antipattern.html ✅ 200

Syntax Error in Code Example (Line 457)

The "Spreading objects with known, explicit props" example has invalid JavaScript — function Foo is missing its parameter parentheses ():

// Current (SyntaxError — won't parse)
export default function Foo {
  const props = { text: '', isPublished: false }
  return (<div {...props} />);
}


// Fixed
export default function Foo() {
  const props = { text: '', isPublished: false }
  return (<div {...props} />);
}

Activity

  1. ljharb commented on Aug 14, 2026

    @ljharb
    Collaborator

    I'm not sure why this issue is needed since the PR covers it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions