Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

connect to localhost react native

import { Platform } from 'react-native';

export const baseUrl = Platform.OS === 'android' ?
    'http://10.0.2.2:3000/'
: 
'http://localhost:3000/';
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #connect #localhost #react #native
ADD COMMENT
Topic
Name
6+4 =