How to use the dotnetify/react-native.debug function in dotnetify

To help you get started, we’ve selected a few dotnetify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dsuryd / dotNetify-react-native-demo / App.js View on Github external
import React from 'react';
import { Alert, Platform, StatusBar, StyleSheet, Text, View } from 'react-native';
import { AppLoading, Font } from 'expo';
import { Ionicons } from '@expo/vector-icons';
import dotnetify from 'dotnetify/react-native';
import signalRnetfx from 'dotnetify/dist/signalR-netfx';
import AppNavigation from './src/AppNavigation';
import ScreenTracker from './src/ScreenTracker';
import Authentication from './src/Authentication';

const androidEmulatorServerUrl = 'http://169.254.80.80:5000';
const liveServerUrl = 'http://dotnetify.net';
const serverUrl = Platform.OS === 'android' ? androidEmulatorServerUrl : liveServerUrl;

dotnetify.debug = true;

// Live server is still running an older signalR version, which requires a different SignalR client library.
if (serverUrl == liveServerUrl) {
  dotnetify.hubLib = signalRnetfx;
  dotnetify.hubServerUrl = serverUrl + '/signalr';
  dotnetify.hubOptions.pingInterval = 60000;
}
else dotnetify.hubServerUrl = serverUrl;

Authentication.url = serverUrl + '/token';

export default class App extends React.Component {
  state = { appLoaded: false, connectionStatus: null };

  constructor(props) {
    super(props);