Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Sahil Sahil5963

🏠
Working from home
View GitHub Profile
@Sahil5963
Sahil5963 / CallScreen.js
Created May 20, 2020
webrtcApp/CallScreen
View CallScreen.js
import React, {useEffect, useState, useCallback} from 'react';
import {View, StyleSheet, Alert} from 'react-native';
import {Text} from 'react-native-paper';
import {Button} from 'react-native-paper';
import AsyncStorage from '@react-native-community/async-storage';
import {TextInput} from 'react-native-paper';
import {useFocusEffect} from '@react-navigation/native';
import InCallManager from 'react-native-incall-manager';
@Sahil5963
Sahil5963 / App.js
Created May 20, 2020
webrtcApp/App.js
View App.js
import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import LoginScreen from './screens/LoginScreen';
import CallScreen from './screens/CallScreen';
import {SafeAreaView} from 'react-native-safe-area-context';
const Stack = createStackNavigator();
@Sahil5963
Sahil5963 / LoginScreen.js
Created May 20, 2020
webrtcApp/LoginScreen.js
View LoginScreen.js
import React, {useState} from 'react';
import {View, StyleSheet} from 'react-native';
import {Text} from 'react-native-paper';
import {TextInput} from 'react-native-paper';
import AsyncStorage from '@react-native-community/async-storage';
import {Button} from 'react-native-paper';
export default function LoginScreen(props) {
const [userId, setUserId] = useState('');
const [loading, setLoading] = useState(false);