Programming Tutorials

React-Native Tutorials

1. Session variables in React Native - Expo

By: Neeraj : 2023-05-17

Description: In React Native and Expo, there is no direct support for session variables like in traditional web development with server-side technologies. However, you can achieve similar functionality by using alternative approaches.


2. use axios in Expo to call APIs

By: Bobby : 2023-05-16

Description: You can use axios in Expo projects. axios is a popular JavaScript library for making HTTP requests, and it can be used in Expo apps as well.


3. Start background location tracking after login in expo react native

By: Adeline : 2023-05-16

Description: If you want to have a background job in an expo app to get the location of the device continuously and the job should start only after login is successful. You can define the background task in app.js and then when login is successful in another component, (for example user.js) you can start the job.


4. set up a global error handler in React Native (expo)

By: Zoe : 2023-05-16

Description: Note: It's generally recommended to handle promise rejections at their source and provide appropriate error handling within your code, rather than relying on a global error handler.


5. SafeAreaView in React Native

By: Yolander : 2023-05-10

Description: In React Native, you can use the SafeAreaView component to ensure that your content is displayed within the visible area of the device screen. The SafeAreaView component is used to handle elements that need to be shown within the safe area boundaries of a device. You can use the following example code to properly format the container style in React Native


6. Some dependencies are incompatible with the installed expo version:

By: Yolander : 2023-05-10

Description: When you start an expo project by running 'expo start' or 'npx expo start', if you are getting this error:


7. disable the back arrow in the header of a screen in a React Navigation Stack Navigator

By: Gren : 2023-04-21

Description: To disable the back arrow in the header of a screen in a React Navigation Stack Navigator, you can set the headerLeft option to null in the screenOptions prop of the navigator. Here's an example:


8. react-native-android-location-services-dialog-box alternative in expo

By: Mary : 2023-04-17

Description: react-native-android-location-services-dialog-box is a library that is specific to the React Native environment and is not compatible with Expo, which uses a different set of APIs for location services. In Expo, you can use the expo-location package to access the device's location services.


9. Error Handling in TextInput - React Native

By: Niraj : 2023-04-17

Description: In this example, the handleBlur function is triggered when the TextInput loses focus. It checks if the value of the TextInput is empty and sets an error message if it is. The error message is then displayed using conditional rendering.


10. react-native-background-job alternative in expo app

By: Terrence : 2023-04-17

Description: react-native-background-job is a library used for running background jobs or tasks in a React Native application. However, since Expo manages a lot of native modules for you, you cannot use this library directly in your Expo app as it requires native code changes.