This repository contains the source code and documentation that powers reactjs.org.
- Git
- Node: any version 12.x starting with v12.0.0 or greater
- Yarn: Refer to the Yarn website for installation instructions
- A fork of the repository (for any contributions)
- A clone of the ar.react.dev repo on your local machine
- Navigate to the project root by running
cd ar.react.dev - Install the website's npm dependencies with
yarn
- Start the development server (powered by Next.js) with
yarn dev - Open http://localhost:3000 in your preferred browser
The documentation is divided into several sections, each with a different tone and purpose. If you plan to write more than a few sentences, it might be helpful to familiarize yourself with the contributing guidelines for the relevant sections.
- Switch to the
mainbranch from any folder in your localar.react.devrepository usinggit checkout main - Ensure you have the latest main code by running
git pull origin main - Create a new branch with a suitable name using
git checkout -b the-name-of-my-branch
- Follow the "Running Locally" instructions
- Save the files and check in the browser
- Changes to React components in
srcwill hot-reload - Changes to markdown files in
contentwill hot-reload - If working with plugins, you may need to remove the
.cachedirectory and restart the server
- Changes to React components in
- If possible, test any visual changes in all the latest versions of common browsers, on both desktop and mobile.
- Run
yarn check-all. (This will run Prettier, ESLint, and validate types.)
- Stage and commit your changes with
git add -A && git commit -m "My message"(replaceMy messagewith a commit message, such asFix header logo on Android) - Push your branch using
git push my-fork-name the-name-of-my-branch - Visit the react.dev repo, where you should see the recently pushed branches.
- Follow GitHub's instructions.
- If possible, include screenshots of visual changes. A preview build is triggered after your changes are pushed to GitHub.
If you are interested in translating react.dev, please see the current translation efforts here.
Content submitted to react.dev is CC-BY-4.0 licensed, as found in the LICENSE-DOCS.md file.