|
1 |
| -# React Native Reproducer |
| 1 | +# reproducer-react-native |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +This is your new React Native Reproducer project. |
| 6 | + |
| 7 | +# Reproducer TODO list |
| 8 | + |
| 9 | +- [x] 1. Create a new reproducer project. |
| 10 | +- [ ] 2. Git clone your repository locally. |
| 11 | +- [ ] 3. Edit the project to reproduce the failure you're seeing. |
| 12 | +- [ ] 4. Push your changes, so that Github Actions can run the CI. |
| 13 | +- [ ] 5. Make sure the repository is public and share the link with the issue you reported. |
| 14 | + |
| 15 | +# How to use this Reproducer |
| 16 | + |
| 17 | +This project has been created with `npx @react-native-community/cli init` and is a vanilla React Native app. |
2 | 18 |
|
3 | 19 | > [!IMPORTANT]
|
4 |
| -> Do not just **fork** this repository, but use instead the [](https://github.com/cortinico/reproducer-react-native/generate) button on GitHub. |
| 20 | +> Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/set-up-your-environment) so that you have a working environment locally. |
| 21 | +
|
| 22 | +## Step 1: Start the Metro Server |
| 23 | + |
| 24 | +First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native. |
| 25 | + |
| 26 | +To start Metro, run the following command from the _root_ of your React Native project: |
| 27 | + |
| 28 | +```bash |
| 29 | +# using npm |
| 30 | +npm start |
| 31 | + |
| 32 | +# OR using Yarn |
| 33 | +yarn start |
| 34 | +``` |
| 35 | + |
| 36 | +## Step 2: Start your Application |
| 37 | + |
| 38 | +Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app: |
| 39 | + |
| 40 | +### For Android |
| 41 | + |
| 42 | +```bash |
| 43 | +# using npm |
| 44 | +npm run android |
| 45 | + |
| 46 | +# OR using Yarn |
| 47 | +yarn android |
| 48 | +``` |
| 49 | + |
| 50 | +### For iOS |
| 51 | + |
| 52 | +First, make sure you install dependencies with: |
| 53 | + |
| 54 | +```bash |
| 55 | +cd ios && bundle install && bundle exec pod install |
| 56 | +``` |
| 57 | + |
| 58 | +Then you can run the iOS app with: |
| 59 | + |
| 60 | +```bash |
| 61 | +# using npm |
| 62 | +npm run ios |
| 63 | + |
| 64 | +# OR using Yarn |
| 65 | +yarn ios |
| 66 | +``` |
| 67 | + |
| 68 | +If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly. |
5 | 69 |
|
6 |
| -This is the React Native **reproducer** template. |
| 70 | +This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively. |
7 | 71 |
|
8 |
| -You can use this template to create a minimal, complete, and reproducible project that the community can use to understand what's your problem. You can read more about the principles of a good reproducible project [here](https://stackoverflow.com/help/mcve). |
| 72 | +## Step 3: Modifying your App |
9 | 73 |
|
10 |
| -This template is up to date with `react-native@latest` as you can find it on [npm](https://www.npmjs.com/package/react-native/v/latest). |
| 74 | +Now that you have successfully run the app, let's modify it. |
11 | 75 |
|
12 |
| -## How to use this repository |
| 76 | +1. Open `App.tsx` in your text editor of choice and edit some lines. |
| 77 | +2. For **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Developer Menu** (<kbd>Ctrl</kbd> + <kbd>M</kbd> (on Window and Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (on macOS)) to see your changes! |
13 | 78 |
|
14 |
| -1. Click on [](https://github.com/cortinico/reproducer-react-native/generate) button to create a new repository starting from this one. |
15 |
| -2. Git clone your repository locally. |
16 |
| -3. Edit the project to reproduce the failure you're seeing. |
17 |
| -4. Push your changes, so that Github Actions can run the CI. |
| 79 | + For **iOS**: Hit <kbd>Cmd ⌘</kbd> + <kbd>R</kbd> in your iOS Simulator to reload the app and see your changes! |
0 commit comments