<commit_before>import React, { Component } from 'react';
import bugsnag, { Client } from 'bugsnag-react-native';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';

class examples extends Component {

  constructor(opts) {
    super(opts);
    this.client = new Client('f35a2472bd230ac0ab0f52715bbdc65d');
    this.client.handleUncaughtErrors();
  }

  render() {
    this.client.leaveBreadcrumb('load main view',
        {type: 'navigation', firstLaunch: 'no'});
    this.client.setUser('123', '<NAME>');
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
          Welcome to the Sample Project!
        </Text>
        <Text style={styles.instructions}>
          To get started, edit index.ios.js<commit_msg>[examples] Add an example of sending a handled error<commit_after>import React, { Component } from 'react';
import { Client } from 'bugsnag-react-native';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';

const client = new Client('API key');

class examples extends Component {

  render() {
    client.leaveBreadcrumb('load main view',
        {type: 'navigation', firstLaunch: 'no'});
    client.setUser('123', '<NAME>');
    client.notify(new Error('foo'));

    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
          Welcome to the Sample Project!
        </Text>
        <Text style={styles.instructions}>
          To get started, edit index.ios.js
{'fraction_non_alphanumeric': 0.134936539746159, 'fraction_numerical': 0.01603206412825651, 'mean_word_length': 3.231638418079096, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5285737', 'n_tokens_mistral': 467, 'n_tokens_neox': 447, 'n_words': 117}