React Native Tutorial Step 12 - Constants.js

Published: 12 August 2019
on channel: 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!


On this page of the site you can watch the video online React Native Tutorial Step 12 - Constants.js with a duration of hours minute second in good quality, which was uploaded by the user CourseHack 12 August 2019, share the link with friends and acquaintances, this video has already been watched 977 times on youtube and it was liked by 2 viewers. Enjoy your viewing!