From a3f85fe6f54e6b0d79d8f165d4d9e8e11f9b4fdb Mon Sep 17 00:00:00 2001 From: Aurora Scharff Date: Wed, 4 Nov 2026 20:05:39 -0600 Subject: [PATCH 1/4] Refresh contributor setup and validation guidance --- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/workflows/analyze.yml | 4 ++-- .github/workflows/site_lint.yml | 8 +++---- .nvmrc | 1 + CLAUDE.md | 5 +++-- CONTRIBUTING.md | 34 ++++-------------------------- README.md | 35 ++++++++++++++++++------------- package.json | 2 +- 8 files changed, 37 insertions(+), 54 deletions(-) create mode 100644 .nvmrc diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index de2bfc3625e..ab8a7d4fe4d 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,5 +3,5 @@ contact_links: url: https://github.com/react/react/issues/new/choose about: This issue tracker is not for bugs in React. Please file React issues here. - name: 🤔 Questions and Help - url: https://reactjs.org/community/support.html + url: https://react.dev/community about: This issue tracker is not for support questions. Please refer to the React community's help and discussion forums. diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 83e7f2e8a9c..7e89d788a42 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -18,7 +18,7 @@ jobs: - name: Set up node uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version-file: .nvmrc cache: yarn cache-dependency-path: yarn.lock @@ -26,7 +26,7 @@ jobs: uses: actions/cache@v4 with: path: '**/node_modules' - key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} + key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('.nvmrc', 'yarn.lock') }} - name: Install deps run: yarn install --frozen-lockfile diff --git a/.github/workflows/site_lint.yml b/.github/workflows/site_lint.yml index 81a04601c21..4c663a2f5f5 100644 --- a/.github/workflows/site_lint.yml +++ b/.github/workflows/site_lint.yml @@ -13,14 +13,14 @@ jobs: lint: runs-on: ubuntu-latest - name: Lint on node 20.x and ubuntu-latest + name: Lint on Node.js 24.x and ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Use Node.js 20.x + - name: Use Node.js from .nvmrc uses: actions/setup-node@v4 with: - node-version: 20.x + node-version-file: .nvmrc cache: yarn cache-dependency-path: yarn.lock @@ -28,7 +28,7 @@ jobs: uses: actions/cache@v4 with: path: '**/node_modules' - key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} + key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('.nvmrc', 'yarn.lock') }} - name: Install deps run: yarn install --frozen-lockfile diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000000..a45fd52cc58 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24 diff --git a/CLAUDE.md b/CLAUDE.md index 3a081e6d517..da7c5108d73 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code when working with this repository. ## Project Overview -This is the React documentation website (react.dev), built with Next.js 15.1.11 and React 19. Documentation is written in MDX format. +This is the React documentation website (react.dev), built with Next.js and React. See `package.json` for dependency versions and `.nvmrc` for the Node.js version used in development and CI. Documentation is written in MDX format. ## Development Commands @@ -13,6 +13,7 @@ yarn build # Production build yarn lint # Run ESLint yarn lint:fix # Auto-fix lint issues yarn tsc # TypeScript type checking +yarn ci-check # Run the same validation checks as CI yarn check-all # Run prettier, lint:fix, tsc, and rss together ``` @@ -47,6 +48,6 @@ When editing files in `src/content/`, the appropriate skill will be auto-suggest For MDX components (DeepDive, Pitfall, Note, etc.), invoke `/docs-components`. For Sandpack code examples, invoke `/docs-sandpack`. -See `.claude/docs/react-docs-patterns.md` for comprehensive style guidelines. +See `.claude/skills/docs-voice/SKILL.md` for shared writing conventions, and the `docs-writer-learn`, `docs-writer-reference`, and `docs-writer-blog` skills for page-specific guidance. Prettier is used for formatting (config in `.prettierrc`). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4c7e5ec74c2..10ceb0be80e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,41 +38,15 @@ Ignore this if you're specifically describing `createElement`. Ignore this if you're specifically writing about ES5. -#### Don't use ES6 features when equivalent ES5 features have no downsides. +#### Prefer readable JavaScript. -Remember that ES6 is still new to a lot of people. While we use it in many places (`const` / `let`, classes, arrow functions), if the equivalent ES5 code is just as straightforward and readable, consider using it. - -In particular, you should prefer named `function` declarations over `const myFunction = () => ...` arrows for top-level functions. However, you *should* use arrow functions where they provide a tangible improvement (such as preserving `this` context inside a component). Consider both sides of the tradeoff when deciding whether to use a new feature. +Use modern JavaScript when it makes an example clearer. Prefer named `function` declarations for components and top-level functions. Use arrow functions for inline callbacks where they improve readability. #### Don't use features that aren't standardized yet. -For example, **don't** write this: - -```js -class MyComponent extends React.Component { - state = {value: ''}; - handleChange = (e) => { - this.setState({value: e.target.value}); - }; -} -``` - -Instead, **do** write this: - -```js -class MyComponent extends React.Component { - constructor(props) { - super(props); - this.handleChange = this.handleChange.bind(this); - this.state = {value: ''}; - } - handleChange(e) { - this.setState({value: e.target.value}); - } -} -``` +Use standardized JavaScript features in examples. Class fields are standardized and may be used when documenting class components. Prefer function components and Hooks for new examples, unless the page documents a class-specific API. -Ignore this rule if you're specifically describing an experimental proposal. Make sure to mention its experimental nature in the code and in the surrounding text. +If you're specifically describing an experimental proposal, mention its experimental nature in the code and surrounding text. ### Style diff --git a/README.md b/README.md index 182192cb552..f8798a43bf2 100644 --- a/README.md +++ b/README.md @@ -7,20 +7,25 @@ This repo contains the source code and documentation powering [react.dev](https: ### Prerequisites 1. Git -1. Node: any version starting with v16.8.0 or greater -1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/) -1. A fork of the repo (for any contributions) -1. A clone of the [react.dev repo](https://github.com/reactjs/react.dev) on your local machine +1. Node.js 24.x (LTS), matching [`.nvmrc`](./.nvmrc) and CI +1. Yarn Classic 1.22.22: See the [installation instructions](https://classic.yarnpkg.com/en/docs/install/) ### Installation -1. `cd react.dev` to go into the project root -3. `yarn` to install the website's npm dependencies +1. [Fork the repo](https://github.com/reactjs/react.dev/fork), then clone your fork. Replace `YOUR_USERNAME` with your GitHub username: + + ```bash + git clone https://github.com/YOUR_USERNAME/react.dev.git + cd react.dev + git remote add upstream https://github.com/reactjs/react.dev.git + ``` + +1. `yarn install --frozen-lockfile` to install the website's dependencies ### Running locally 1. `yarn dev` to start the development server (powered by [Next.js](https://nextjs.org/)) -1. `open http://localhost:3000` to open the site in your favorite browser +1. Open [http://localhost:3000](http://localhost:3000) in your browser ## Contributing @@ -31,33 +36,35 @@ The documentation is divided into several sections with a different tone and pur ### Create a branch 1. `git checkout main` from any folder in your local `react.dev` repository -1. `git pull origin main` to ensure you have the latest main code +1. `git fetch upstream` to get the latest changes from the source repo +1. `git merge --ff-only upstream/main` to update your local `main` 1. `git checkout -b the-name-of-my-branch` (replacing `the-name-of-my-branch` with a suitable name) to create a branch ### Make the change 1. Follow the ["Running locally"](#running-locally) instructions 1. Save the files and check in the browser - 1. Changes to React components in `src` will hot-reload - 1. Changes to markdown files in `content` will hot-reload - 1. If working with plugins, you may need to remove the `.cache` directory and restart the server + 1. Changes to React components in `src` will hot-reload + 1. Changes to Markdown files in `src/content` will hot-reload + 1. If changes to MDX plugins aren't reflected, stop the server, remove `node_modules/.cache/react-docs-mdx`, and restart it ### Test the change 1. If possible, test any visual changes in all latest versions of common browsers, on both desktop and mobile. -2. Run `yarn check-all`. (This will run Prettier, ESLint and validate types.) +1. Run `yarn ci-check` to run the same checks as CI: formatting, ESLint, local ESLint rule tests, TypeScript, heading IDs, RSS generation, and internal links. +1. To apply formatting and ESLint fixes, run `yarn check-all`. This command modifies files and also checks types and generates RSS. Review the resulting changes before committing. ### Push it 1. `git add -A && git commit -m "My message"` (replacing `My message` with a commit message, such as `Fix header logo on Android`) to stage and commit your changes -1. `git push my-fork-name the-name-of-my-branch` +1. `git push -u origin the-name-of-my-branch` to push the branch to your fork 1. Go to the [react.dev repo](https://github.com/reactjs/react.dev) and you should see recently pushed branches. 1. Follow GitHub's instructions. 1. If possible, include screenshots of visual changes. A preview build is triggered after your changes are pushed to GitHub. ## Translation -If you are interested in translating `react.dev`, please see the current translation efforts [here](https://github.com/reactjs/react.dev/issues/4135). +If you are interested in translating `react.dev`, see the [translation guide](https://react.dev/community/translations) and [current translation progress](https://translations.react.dev/). ## License Content submitted to [react.dev](https://react.dev/) is CC-BY-4.0 licensed, as found in the [LICENSE-DOCS.md](https://github.com/reactjs/react.dev/blob/main/LICENSE-DOCS.md) file. diff --git a/package.json b/package.json index 20af6969d11..6eb98b4bfab 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "webpack-bundle-analyzer": "^4.5.0" }, "engines": { - "node": ">=16.8.0" + "node": ">=24.0.0" }, "nextBundleAnalysis": { "budget": null, From 705a2d0b16d2a2dd072f5e070a0052c576ee4bcc Mon Sep 17 00:00:00 2001 From: Aurora Scharff Date: Wed, 4 Nov 2026 20:11:50 -0600 Subject: [PATCH 2/4] Limit contributor cleanup to factual corrections --- .github/workflows/analyze.yml | 4 ++-- .github/workflows/site_lint.yml | 8 +++---- .nvmrc | 1 - CLAUDE.md | 5 ++--- CONTRIBUTING.md | 10 ++++----- README.md | 37 ++++++++++++++------------------- package.json | 2 +- 7 files changed, 30 insertions(+), 37 deletions(-) delete mode 100644 .nvmrc diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 7e89d788a42..83e7f2e8a9c 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -18,7 +18,7 @@ jobs: - name: Set up node uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version: '20.x' cache: yarn cache-dependency-path: yarn.lock @@ -26,7 +26,7 @@ jobs: uses: actions/cache@v4 with: path: '**/node_modules' - key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('.nvmrc', 'yarn.lock') }} + key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Install deps run: yarn install --frozen-lockfile diff --git a/.github/workflows/site_lint.yml b/.github/workflows/site_lint.yml index 4c663a2f5f5..81a04601c21 100644 --- a/.github/workflows/site_lint.yml +++ b/.github/workflows/site_lint.yml @@ -13,14 +13,14 @@ jobs: lint: runs-on: ubuntu-latest - name: Lint on Node.js 24.x and ubuntu-latest + name: Lint on node 20.x and ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Use Node.js from .nvmrc + - name: Use Node.js 20.x uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version: 20.x cache: yarn cache-dependency-path: yarn.lock @@ -28,7 +28,7 @@ jobs: uses: actions/cache@v4 with: path: '**/node_modules' - key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('.nvmrc', 'yarn.lock') }} + key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Install deps run: yarn install --frozen-lockfile diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index a45fd52cc58..00000000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -24 diff --git a/CLAUDE.md b/CLAUDE.md index da7c5108d73..3943097cc4f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code when working with this repository. ## Project Overview -This is the React documentation website (react.dev), built with Next.js and React. See `package.json` for dependency versions and `.nvmrc` for the Node.js version used in development and CI. Documentation is written in MDX format. +This is the React documentation website (react.dev), built with Next.js 15.1.12 and React 19. Documentation is written in MDX format. ## Development Commands @@ -13,7 +13,6 @@ yarn build # Production build yarn lint # Run ESLint yarn lint:fix # Auto-fix lint issues yarn tsc # TypeScript type checking -yarn ci-check # Run the same validation checks as CI yarn check-all # Run prettier, lint:fix, tsc, and rss together ``` @@ -48,6 +47,6 @@ When editing files in `src/content/`, the appropriate skill will be auto-suggest For MDX components (DeepDive, Pitfall, Note, etc.), invoke `/docs-components`. For Sandpack code examples, invoke `/docs-sandpack`. -See `.claude/skills/docs-voice/SKILL.md` for shared writing conventions, and the `docs-writer-learn`, `docs-writer-reference`, and `docs-writer-blog` skills for page-specific guidance. +See `.claude/skills/` for comprehensive style guidelines. Prettier is used for formatting (config in `.prettierrc`). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 10ceb0be80e..a12184fb8e7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,15 +38,15 @@ Ignore this if you're specifically describing `createElement`. Ignore this if you're specifically writing about ES5. -#### Prefer readable JavaScript. +#### Don't use ES6 features when equivalent ES5 features have no downsides. -Use modern JavaScript when it makes an example clearer. Prefer named `function` declarations for components and top-level functions. Use arrow functions for inline callbacks where they improve readability. +While we use ES6 in many places (`const` / `let`, classes, arrow functions), if the equivalent ES5 code is just as straightforward and readable, consider using it. -#### Don't use features that aren't standardized yet. +In particular, you should prefer named `function` declarations over `const myFunction = () => ...` arrows for top-level functions. However, you *should* use arrow functions where they provide a tangible improvement (such as preserving `this` context inside a component). Consider both sides of the tradeoff when deciding whether to use a new feature. -Use standardized JavaScript features in examples. Class fields are standardized and may be used when documenting class components. Prefer function components and Hooks for new examples, unless the page documents a class-specific API. +#### Don't use features that aren't standardized yet. -If you're specifically describing an experimental proposal, mention its experimental nature in the code and surrounding text. +Ignore this rule if you're specifically describing an experimental proposal. Make sure to mention its experimental nature in the code and in the surrounding text. ### Style diff --git a/README.md b/README.md index f8798a43bf2..9c52f08f567 100644 --- a/README.md +++ b/README.md @@ -7,25 +7,20 @@ This repo contains the source code and documentation powering [react.dev](https: ### Prerequisites 1. Git -1. Node.js 24.x (LTS), matching [`.nvmrc`](./.nvmrc) and CI -1. Yarn Classic 1.22.22: See the [installation instructions](https://classic.yarnpkg.com/en/docs/install/) +1. Node: v18.18.0 or greater (see supported versions in [`package.json`](./package.json)) +1. Yarn Classic 1.22.22: See [Yarn website for installation instructions](https://classic.yarnpkg.com/en/docs/install/) +1. A fork of the repo (for any contributions) +1. A clone of your fork of the [react.dev repo](https://github.com/reactjs/react.dev) on your local machine ### Installation -1. [Fork the repo](https://github.com/reactjs/react.dev/fork), then clone your fork. Replace `YOUR_USERNAME` with your GitHub username: - - ```bash - git clone https://github.com/YOUR_USERNAME/react.dev.git - cd react.dev - git remote add upstream https://github.com/reactjs/react.dev.git - ``` - -1. `yarn install --frozen-lockfile` to install the website's dependencies +1. `cd react.dev` to go into the project root +3. `yarn` to install the website's npm dependencies ### Running locally 1. `yarn dev` to start the development server (powered by [Next.js](https://nextjs.org/)) -1. Open [http://localhost:3000](http://localhost:3000) in your browser +1. `open http://localhost:3000` to open the site in your favorite browser ## Contributing @@ -35,36 +30,36 @@ The documentation is divided into several sections with a different tone and pur ### Create a branch +1. `git remote add upstream https://github.com/reactjs/react.dev.git` to add the source repo as a remote (only needed once) 1. `git checkout main` from any folder in your local `react.dev` repository -1. `git fetch upstream` to get the latest changes from the source repo -1. `git merge --ff-only upstream/main` to update your local `main` +1. `git pull --ff-only upstream main` 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 ### Make the change 1. Follow the ["Running locally"](#running-locally) instructions 1. Save the files and check in the browser - 1. Changes to React components in `src` will hot-reload - 1. Changes to Markdown files in `src/content` will hot-reload - 1. If changes to MDX plugins aren't reflected, stop the server, remove `node_modules/.cache/react-docs-mdx`, and restart it + 1. Changes to React components in `src` will hot-reload + 1. Changes to markdown files in `src/content` will hot-reload + 1. If working with plugins, you may need to remove the `node_modules/.cache/react-docs-mdx` directory and restart the server ### Test the change 1. If possible, test any visual changes in all latest versions of common browsers, on both desktop and mobile. -1. Run `yarn ci-check` to run the same checks as CI: formatting, ESLint, local ESLint rule tests, TypeScript, heading IDs, RSS generation, and internal links. -1. To apply formatting and ESLint fixes, run `yarn check-all`. This command modifies files and also checks types and generates RSS. Review the resulting changes before committing. +2. Run `yarn check-all`. (This will apply Prettier and ESLint fixes, validate types, and generate RSS.) +3. Run `yarn ci-check` to run the same checks as CI. ### Push it 1. `git add -A && git commit -m "My message"` (replacing `My message` with a commit message, such as `Fix header logo on Android`) to stage and commit your changes -1. `git push -u origin the-name-of-my-branch` to push the branch to your fork +1. `git push origin the-name-of-my-branch` 1. Go to the [react.dev repo](https://github.com/reactjs/react.dev) and you should see recently pushed branches. 1. Follow GitHub's instructions. 1. If possible, include screenshots of visual changes. A preview build is triggered after your changes are pushed to GitHub. ## Translation -If you are interested in translating `react.dev`, see the [translation guide](https://react.dev/community/translations) and [current translation progress](https://translations.react.dev/). +If you are interested in translating `react.dev`, please see the current translation efforts [here](https://react.dev/community/translations). ## License Content submitted to [react.dev](https://react.dev/) is CC-BY-4.0 licensed, as found in the [LICENSE-DOCS.md](https://github.com/reactjs/react.dev/blob/main/LICENSE-DOCS.md) file. diff --git a/package.json b/package.json index 6eb98b4bfab..f7a4a352526 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "webpack-bundle-analyzer": "^4.5.0" }, "engines": { - "node": ">=24.0.0" + "node": "^18.18.0 || ^19.8.0 || >=20.0.0" }, "nextBundleAnalysis": { "budget": null, From 4d6ab5efc88b95358ba0daea31f04cf93ece6956 Mon Sep 17 00:00:00 2001 From: Aurora Scharff Date: Wed, 4 Nov 2026 20:18:22 -0600 Subject: [PATCH 3/4] Preserve original fork workflow and document its remote --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9c52f08f567..39171ebb2ad 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,12 @@ This repo contains the source code and documentation powering [react.dev](https: 1. Node: v18.18.0 or greater (see supported versions in [`package.json`](./package.json)) 1. Yarn Classic 1.22.22: See [Yarn website for installation instructions](https://classic.yarnpkg.com/en/docs/install/) 1. A fork of the repo (for any contributions) -1. A clone of your fork of the [react.dev repo](https://github.com/reactjs/react.dev) on your local machine +1. A clone of the [react.dev repo](https://github.com/reactjs/react.dev) on your local machine ### Installation 1. `cd react.dev` to go into the project root +2. `git remote add my-fork-name https://github.com/YOUR_USERNAME/react.dev.git` to add your fork as a remote (replace `YOUR_USERNAME` with your GitHub username; only needed once) 3. `yarn` to install the website's npm dependencies ### Running locally @@ -30,9 +31,8 @@ The documentation is divided into several sections with a different tone and pur ### Create a branch -1. `git remote add upstream https://github.com/reactjs/react.dev.git` to add the source repo as a remote (only needed once) 1. `git checkout main` from any folder in your local `react.dev` repository -1. `git pull --ff-only upstream main` to ensure you have the latest main code +1. `git pull origin main` 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 ### Make the change @@ -52,7 +52,7 @@ The documentation is divided into several sections with a different tone and pur ### Push it 1. `git add -A && git commit -m "My message"` (replacing `My message` with a commit message, such as `Fix header logo on Android`) to stage and commit your changes -1. `git push origin the-name-of-my-branch` +1. `git push my-fork-name the-name-of-my-branch` 1. Go to the [react.dev repo](https://github.com/reactjs/react.dev) and you should see recently pushed branches. 1. Follow GitHub's instructions. 1. If possible, include screenshots of visual changes. A preview build is triggered after your changes are pushed to GitHub. From f139022a092a839bf622af5edebb93e03a6b98fa Mon Sep 17 00:00:00 2001 From: Aurora Scharff Date: Wed, 4 Nov 2026 22:08:30 -0600 Subject: [PATCH 4/4] Keep concrete syntax examples and simplify fork instructions --- CONTRIBUTING.md | 27 +++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a12184fb8e7..93a01cd0dbf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,6 +46,33 @@ In particular, you should prefer named `function` declarations over `const myFun #### Don't use features that aren't standardized yet. +For example, **don't** write this: + +```js +function Greeting({isLoggedIn}) { + return do { + if (isLoggedIn) { +

Welcome back!

; + } else { +

Please sign in.

; + } + }; +} +``` + +The [`do` expression syntax](https://github.com/tc39/proposal-do-expressions) is still experimental. + +Instead, **do** write this: + +```js +function Greeting({isLoggedIn}) { + if (isLoggedIn) { + return

Welcome back!

; + } + return

Please sign in.

; +} +``` + Ignore this rule if you're specifically describing an experimental proposal. Make sure to mention its experimental nature in the code and in the surrounding text. ### Style diff --git a/README.md b/README.md index 39171ebb2ad..b02001c3431 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This repo contains the source code and documentation powering [react.dev](https: ### Installation 1. `cd react.dev` to go into the project root -2. `git remote add my-fork-name https://github.com/YOUR_USERNAME/react.dev.git` to add your fork as a remote (replace `YOUR_USERNAME` with your GitHub username; only needed once) +2. `git remote add my-fork-name https://github.com/YOUR_USERNAME/react.dev.git` to add your fork as a remote. Replace `YOUR_USERNAME` with your GitHub username. You only need to do this once. 3. `yarn` to install the website's npm dependencies ### Running locally