React Native Tutorial Step 12 - Constants.js

Veröffentlicht am: 12 August 2019
auf dem Kanal: CourseHack
977
2

Today's tutorial we're going to be working on setting up our API configurations. So, go ahead, your first job:

TODO #1: Create a services/api/ folder under src/ - so you will have /src/services/api

TODO #2: Create a constants.js under the /src/services/api folder.

In this constants.js file, we will be handling a lot of things, such as environments. Yes, with expo, you can code for different environments (i.e. development, staging, production). 

TODO #3: Copy the following code in the video into your constants.js file.

TODO #4: Use the ip retrieved by ifconfig and replace the "xxx.xxx.xxx.xxx" in api_url = 'http://xxx.xxx.xxx.xxx:3001'

Interested in our medium post? Check out   / react-native-tutorial-step-12-constants-js  

Don't forget to like, comment, and subscribe!!!

========================================================
Reference Links
========================================================
ifconfig: https://en.wikipedia.org/wiki/Ifconfig
========================================================
Connect with me!
========================================================
Linkedin:   / donaldlee50  
Instagram:   / donlee50  
Twitter:   / donaldlee50  
Youtube:    / coursehack  
Mailing List: http://bit.ly/coursehack-mailing-list
Coursehack's Facebook Group: bit.ly/join-coursehack-facebook-group

Don't forget to like, comment, and subscribe!


Auf dieser Seite können Sie das Online-Video React Native Tutorial Step 12 - Constants.js mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer CourseHack 12 August 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 977 Mal angesehen und es wurde von 2 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!