render()

in TestAppTypescript/src/AnalyticsScreen.tsx [42:86]


  render() {
    return (
      <View style={SharedStyles.container}>
        <ScrollView>
          <Text style={SharedStyles.heading}>Test Analytics</Text>

          <Text style={SharedStyles.enabledText}>
            Analytics enabled: {this.state.analyticsEnabled ? "yes" : "no"}
          </Text>
          <TouchableOpacity onPress={this.toggleEnabled}>
            <Text style={SharedStyles.toggleEnabled}>toggle</Text>
          </TouchableOpacity>

          <TouchableOpacity
            onPress={() =>
              Analytics.trackEvent("Button press", { page: "Home page" })
            }
          >
            <Text style={SharedStyles.button}>Track Event</Text>
          </TouchableOpacity>

          <TouchableOpacity
            onPress={() => Analytics.trackEvent("Event without properties")}
          >
            <Text style={SharedStyles.button}>
              Track Event without properties
            </Text>
          </TouchableOpacity>

          <TouchableOpacity
            onPress={() =>
              Analytics.trackEvent("Button press", {
                propertyValueTooLong:
                  "12345678901234567890123456789012345678901234567890123456789012345"
              })
            }
          >
            <Text style={SharedStyles.button}>
              Track Event - event property value truncated after 64 characters
            </Text>
          </TouchableOpacity>
        </ScrollView>
      </View>
    );
  }