diff --git a/README.md b/README.md index 5a134c65..45a21218 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ This repo contains the source code and documentation powering [reactjs.org](http 1. Git 1. Node: install version 8.4 or greater -1. Yarn: `npm i -g yarn` to install it globally via NPM -1. A clone of the [reactjs.org repo](https://github.com/facebook/reactjs.org) on your local machine +1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/) +1. A clone of the [reactjs.org repo](https://github.com/reactjs/reactjs.org) on your local machine 1. A fork of the repo (for any contributions) ### Installation @@ -26,7 +26,7 @@ This repo contains the source code and documentation powering [reactjs.org](http ### Create a branch -1. `git checkout master` from any folder in your local react repository +1. `git checkout master` from any folder in your local `reactjs.org` repository 1. `git pull origin master` to ensure you have the latest main code 1. `git checkout -b the-name-of-my-branch` (replacing `the-name-of-my-branch` with a suitable name) to create a branch @@ -47,10 +47,10 @@ This repo contains the source code and documentation powering [reactjs.org](http 1. `git add -A && git commit -m "My message"` (replacing `My message` with a commit message, such as `Fixed header logo on Android`) to stage and commit your changes 1. `git push my-fork-name the-name-of-my-branch` -1. Go to the [reactjs.org repo](https://github.com/facebook/reactjs.org) and you should see recently pushed branches. +1. Go to the [reactjs.org repo](https://github.com/reactjs/reactjs.org) and you should see recently pushed branches. 1. Follow GitHub's instructions. 1. If possible include screenshots of visual changes. A Netlify build will also be automatically created once you make your PR so other people can see your change. ## Troubleshooting -- `yarn reset` to clear the local cache \ No newline at end of file +- `yarn reset` to clear the local cache diff --git a/content/blog/2015-01-27-react-v0.13.0-beta-1.md b/content/blog/2015-01-27-react-v0.13.0-beta-1.md index a2cd597e..76fea92d 100644 --- a/content/blog/2015-01-27-react-v0.13.0-beta-1.md +++ b/content/blog/2015-01-27-react-v0.13.0-beta-1.md @@ -89,8 +89,8 @@ Therefore we decided not to have this built-in into React's class model. You can ```javascript class Counter extends React.Component { - constructor() { - super(); + constructor(props) { + super(props); this.tick = this.tick.bind(this); } tick() { diff --git a/content/docs/codebase-overview.md b/content/docs/codebase-overview.md index f87b9418..6a9ec2b5 100644 --- a/content/docs/codebase-overview.md +++ b/content/docs/codebase-overview.md @@ -66,7 +66,7 @@ The [fbjs repository](https://github.com/facebook/fbjs) exists because React sha After cloning the [React repository](https://github.com/facebook/react), you will see a few top-level folders in it: * [`src`](https://github.com/facebook/react/tree/master/src) is the source code of React. **If your change is related to the code, `src` is where you'll spend most of your time.** -* [`docs`](https://github.com/facebook/react/tree/master/docs) is the React documentation website. When you change APIs, make sure to update the relevant Markdown files. +* [`docs`](https://github.com/reactjs/reactjs.org/tree/master/content) is the React documentation website. When you change APIs, make sure to update the relevant Markdown files. * [`fixtures`](https://github.com/facebook/react/tree/master/fixtures) contains a few small React test applications for contributors. * [`packages`](https://github.com/facebook/react/tree/master/packages) contains metadata (such as `package.json`) for all packages in the React repository. Nevertheless, their source code is still located inside [`src`](https://github.com/facebook/react/tree/master/src). * `build` is the build output of React. It is not in the repository but it will appear in your React clone after you [build it](/docs/how-to-contribute.html#development-workflow) for the first time. diff --git a/content/docs/higher-order-components.md b/content/docs/higher-order-components.md index 573c6cd7..d5d2a778 100644 --- a/content/docs/higher-order-components.md +++ b/content/docs/higher-order-components.md @@ -30,8 +30,8 @@ For example, say you have a `CommentList` component that subscribes to an extern ```js class CommentList extends React.Component { - constructor() { - super(); + constructor(props) { + super(props); this.handleChange = this.handleChange.bind(this); this.state = { // "DataSource" is some global data source diff --git a/content/docs/installation.md b/content/docs/installation.md index 813057a6..5e62dabc 100644 --- a/content/docs/installation.md +++ b/content/docs/installation.md @@ -24,7 +24,7 @@ Here are a couple of ways to get started: If you're just interested in playing around with React, you can use CodePen. Try starting from [this Hello World example code](http://codepen.io/gaearon/pen/rrpgNB?editors=0010). You don't need to install anything; you can just modify the code and see if it works. -If you prefer to use your own text editor, you can also download this HTML file, edit it, and open it from the local filesystem in your browser. It does a slow runtime code transformation, so don't use it in production. +If you prefer to use your own text editor, you can also download this HTML file, edit it, and open it from the local filesystem in your browser. It does a slow runtime code transformation, so don't use it in production. If you want to use it for a full application, there are two popular ways to get started with React: using Create React App, or adding it to an existing application. @@ -84,7 +84,7 @@ Both Yarn and npm download packages from the [npm registry](http://npmjs.com/). We recommend using React with [Babel](http://babeljs.io/) to let you use ES6 and JSX in your JavaScript code. ES6 is a set of modern JavaScript features that make development easier, and JSX is an extension to the JavaScript language that works nicely with React. -The [Babel setup instructions](https://babeljs.io/docs/setup/) explain how to configure Babel in many different build environments. Make sure you install [`babel-preset-react`](http://babeljs.io/docs/plugins/preset-react/#basic-setup-with-the-cli-) and [`babel-preset-es2015`](http://babeljs.io/docs/plugins/preset-es2015/#basic-setup-with-the-cli-) and enable them in your [`.babelrc` configuration](http://babeljs.io/docs/usage/babelrc/), and you're good to go. +The [Babel setup instructions](https://babeljs.io/docs/setup/) explain how to configure Babel in many different build environments. Make sure you install [`babel-preset-react`](http://babeljs.io/docs/plugins/preset-react/#basic-setup-with-the-cli-) and [`babel-preset-env`](http://babeljs.io/docs/plugins/preset-env/) and enable them in your [`.babelrc` configuration](http://babeljs.io/docs/usage/babelrc/), and you're good to go. ### Hello World with ES6 and JSX diff --git a/content/tutorial/tutorial.md b/content/tutorial/tutorial.md index 0e8ccfd9..b940c0c8 100644 --- a/content/tutorial/tutorial.md +++ b/content/tutorial/tutorial.md @@ -200,8 +200,8 @@ First, add a constructor to the class to initialize the state: ```javascript{2-7} class Square extends React.Component { - constructor() { - super(); + constructor(props) { + super(props); this.state = { value: null, }; @@ -228,8 +228,8 @@ Now the `