<commit_before># React Native

This is an example project showing how to use `@bugsnag/react-native` with a React Native v0.63 project.

This project was bootstrapped with `react-native init`.

## Usage

1. Clone the repo and `cd` into the directory of this example:
    ```
    git clone <EMAIL>:bugsnag/bugsnag-js.git
    cd bugsnag-js/examples/reactnative/rn063example
    npm install
    ```

1. [Create a bugsnag account](https://app.bugsnag.com/user/new) and create a react native project.

1. Add your project api key to [android/app/src/main/AndroidManifest.xml](android/app/src/main/AndroidManifest.xml#L25-L26):

   ```xml
      <meta-data android:name="com.bugsnag.android.API_KEY"
                 android:value="YOUR-API-KEY-HERE" />
   ```

   and [ios/rn063example/Info.plist](ios/rn063example/Info.plist#L4-L5):

   ```xml
    <key>BugsnagAPIKey</key>
    <string>YOUR-API-KEY-HERE</string>
   ```

    The API key can be found in the Bugsnag settings for your project.

1. Run the app on either Android or iOS:

```
react-native run-ios
react-native run-android
```

Please note that in development mode, unhandled JS errors will not be reported to Bugsnag. You can run in release mode to test this:

```<commit_msg>docs(example): add missing pod install step for React Native example<commit_after># React Native

This is an example project showing how to use `@bugsnag/react-native` with a React Native v0.63 project.

This project was bootstrapped with `react-native init`.

## Usage

1. Clone the repo and `cd` into the directory of this example:
    ```
    git clone <EMAIL>:bugsnag/bugsnag-js.git
    cd bugsnag-js/examples/reactnative/rn063example
    npm install
    ```

1. [Create a bugsnag account](https://app.bugsnag.com/user/new) and create a react native project.

1. Add your project api key to [android/app/src/main/AndroidManifest.xml](android/app/src/main/AndroidManifest.xml#L25-L26):

   ```xml
      <meta-data android:name="com.bugsnag.android.API_KEY"
                 android:value="YOUR-API-KEY-HERE" />
   ```

   and [ios/rn063example/Info.plist](ios/rn063example/Info.plist#L4-L5):

   ```xml
    <key>BugsnagAPIKey</key>
    <string>YOUR-API-KEY-HERE</string>
   ```

    The API key can be found in the Bugsnag settings for your project.

1. For iOS only, install the project dependencies using: 

```
pod install --project-directory=ios
```

1. Run the app on either Android or iOS:

```
react-native run-ios
react-native run-android
```

Please note that in development mode, unhandled JS errors will not be reported to Bugsnag. You can run in release mode to test this:

```
{'fraction_non_alphanumeric': 0.11504761904761905, 'fraction_numerical': 0.017142857142857144, 'mean_word_length': 3.488888888888889, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2001051', 'n_tokens_mistral': 890, 'n_tokens_neox': 846, 'n_words': 269}