Skip to content

Commit 7a90bb5

Browse files
authored
Add guidance on deps to the contributing guide (facebook#4217)
1 parent e6f5deb commit 7a90bb5

File tree

2 files changed

+20
-23
lines changed

2 files changed

+20
-23
lines changed

website/contributing/contributing-overview.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,25 +98,6 @@ We recommend referring to the `react-native-website` repository [Readme file](ht
9898

9999
Code-level contributions to React Native generally come in the form of [pull requests](https://help.github.com/en/articles/about-pull-requests). These are done by forking the repo and making changes locally.
100100

101-
Directly in the repo, there is the [`rn-tester` app](https://github.com/facebook/react-native/tree/main/packages/rn-tester) that you can install on your device (or simulators) and use to test the changes you're making to React Native sources.
102-
103-
The process of proposing a change to React Native can be summarized as follows:
104-
105-
1. Fork the React Native repository and create your branch from `main`.
106-
2. Make the desired changes to React Native sources (tip: [editor setup](./how-to-open-a-pull-request#1-make-changes-to-the-code)). Use the `packages/rn-tester` app to test them out.
107-
3. If you've added code that should be tested, add tests.
108-
4. If you've changed APIs, update the documentation, which lives in [separate repo](https://github.com/facebook/react-native-website/).
109-
5. Ensure the test suite passes, either locally or on CI once you opened a pull request.
110-
6. Make sure your code lints (for example via `yarn lint --fix`).
111-
7. Push the changes to your fork.
112-
8. Create a pull request to the React Native repository.
113-
9. Review and address comments on your pull request.
114-
10. A bot may comment with suggestions. Generally we ask you to resolve these first before a maintainer will review your code.
115-
11. If changes are requested and addressed, please [request review](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) to notify reviewers to take another look.
116-
12. If you haven't already, please complete the [Contributor License Agreement](/contributing/contribution-license-agreement) ("CLA"). **[Complete your CLA here.](https://code.facebook.com/cla)**
117-
118-
If all goes well, your pull request will be merged. If it is not merged, maintainers will do their best to explain the reason why.
119-
120101
### Step-by-step Guide
121102

122103
Whenever you are ready to contribute code, check out our [step-by-step guide to sending your first pull request](/contributing/how-to-open-a-pull-request), or read the [How to Contribute Code](/contributing/how-to-contribute-code) page for more details.

website/contributing/how-to-open-a-pull-request.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,23 @@ git checkout --branch my_feature_branch --track origin/main
5050

5151
## Chapter II: Implementing your Changes
5252

53-
### 1. Make changes to the code
53+
### 1. Install dependencies
54+
55+
React Native is a JavaScript monorepo managed by [Yarn Workspaces (Yarn Classic)](https://classic.yarnpkg.com/lang/en/docs/workspaces/).
56+
57+
Run a project-level install:
58+
59+
```sh
60+
yarn
61+
```
62+
63+
You will also need to build the `react-native-codegen` package once:
64+
65+
```sh
66+
yarn --cwd packages/react-native-codegen build
67+
```
68+
69+
### 2. Make changes to the code
5470

5571
You can now open the project using your code editor of choice. [Visual Studio Code](https://code.visualstudio.com/) is popular with JavaScript developers, and recommended if you are making general changes to React Native.
5672

@@ -60,11 +76,11 @@ IDE project configurations:
6076
- **Android Studio**: Open the repo root folder (containing the `.idea` config directory).
6177
- **Xcode**: Open `packages/rn-tester/RNTesterPods.xcworkspace`.
6278

63-
### 2. Test your changes
79+
### 3. Test your changes
6480

6581
Make sure your changes are correct and do not introduce any test failures. You can learn more in [Running and Writing Tests](/contributing/how-to-run-and-write-tests).
6682

67-
### 3. Lint your code
83+
### 4. Lint your code
6884

6985
We understand it can take a while to ramp up and get a sense of the style followed for each of the languages in use in the core React Native repository. Developers should not need to worry about minor nits, so whenever possible, we use tools that automate the process of rewriting your code to follow conventions.
7086

@@ -74,7 +90,7 @@ We also use a linter to catch styling issues that may exist in your code. You ca
7490

7591
To learn more about coding conventions, refer to the [Coding Style guide](/contributing/how-to-contribute-code#coding-style).
7692

77-
### 4. View your changes
93+
### 5. View your changes
7894

7995
Many popular editors integrate with source control in some way. You can also use `git status` and `git diff` on the command line to keep track of what has changed.
8096

0 commit comments

Comments
 (0)