Programming Tutorials

React-Native Tutorials

11. 'import' and 'export' may only appear at the top level - React Native

By: Mary : 2023-04-17

Description: In JavaScript modules, import and export statements can only appear at the top level of a file, not inside functions, loops, or conditionals. If you need to conditionally import a module or dynamically load a module, you can use a dynamic import statement.


12. Send push notifications to android/ios sample code using expo - react native

By: Linda Ng : 2023-04-13

Description: Expo Notifications is a module provided by Expo that makes it easy to send and receive push notifications in your Expo app. Here are some advantages of using Expo Notifications:


13. expo-secure-store vs expo-file-system in expo - react native

By: Karthik Gupta : 2023-04-13

Description: Expo provides two different packages for managing data storage in your app: <code>expo-secure-store</code> and <code>expo-file-system</code>.


14. loadAsync() vs useFonts() in expo - react native

By: Karthik Gupta : 2023-04-13

Description: <code>expo-font</code> provides two methods for loading custom fonts in React Native: <code>loadAsync()</code> and <code>useFonts()</code>. Here are some key differences between the two


15. OpenType (OTF) vs TrueType (TTF)

By: Karthik Gupta : 2023-04-13

Description: Both OpenType (OTF) and TrueType (TTF) are widely used font formats, and both have their own advantages and disadvantages.


16. Three dots ... - Spread syntax in React Native

By: Nirmal : 2023-04-11

Description: In React Native, the three dots (...) are used to spread the contents of an array or an object. This is called the spread syntax.


17. StackNavigator example in React Native

By: Manoj : 2023-04-09

Description: In this example, we import <code>createStackNavigator</code> and <code>NavigationContainer</code> from <code>@react-navigation/native</code>. We then define two screens, <code>HomeScreen</code> and <code>DetailsScreen</code>, which are rendered using <code>Stack.Screen</code> components inside a <code>Stack.Navigator</code> component. We also define a <code>Stack</code> constant to hold our <code>StackNavigator</code>.


18. create-expo-app vs expo init

By: Manoj : 2023-04-09

Description: <code>npx create-expo-app</code> is the recommended way to create a new Expo project instead of <code>expo init</code>. <code>npx create-expo-app</code> creates a new Expo project with the latest Expo SDK version and the new project structure introduced in SDK 41.


19. Touchables in React Native

By: Niraj : 2023-04-09

Description: In React Native, handling touches can be done using various components like TouchableOpacity, TouchableHighlight, TouchableWithoutFeedback, and TouchableNativeFeedback.


20. Image component in React Native

By: Niraj : 2023-04-09

Description: In React Native, the <code>Image</code> component is used to display images. It supports several props to control how the image is displayed