Posts

Best Practices for React Native Development Don’t and Do’s Prem Yathvik

  Introduction: React Native, a powerful framework born from the React library, enables developers to build cross-platform mobile applications efficiently. As with any technology, adhering to best practices is crucial for a successful and secure development process. In this guide, we’ll explore key considerations for React Native development, ranging from version management to state handling and optimization techniques. Understanding React Basics:  React itself is a library that facilitates the creation of user interfaces through modular components. However, for building entire applications, frameworks like React Native or Next.js are recommended. These frameworks provide additional tools and conventions for routing, data fetching, and a seamless development experience. Version Management:  Always stay up-to-date with the latest React Native version to benefit from enhancements, bug fixes, and security patches. Deprecated versions are no longer supported by the npm commun...

Creating a Circular File Download Progress Bar using SVG in React Native

Image
  Introduction: In this blog, we will learn how to create a circular download progress bar using Vector Graphics (G) in a React Native application. This progress bar can be used to show the progress of a file download in a visually appealing way. Prerequisites: Basic understanding of React Native Familiarity with SVG SVG Circular Progress Bar: SVG provides a powerful way to create vector-based graphics that can be scaled without losing quality. In this example, we will create a circular progress bar using SVG circles and paths. The basic structure of the SVG component is as follows: < Svg width = {size} height = {size} > {/* Background Circle */} < Circle stroke = "#D9D9D9" fill = "none" cx = {size / 2 } cy = {size / 2 } r = {radius} strokeWidth = {strokeWidth} /> {/* Progress Circle */} < Circle stroke = "#00C282" fi...

Check the React native application is connected to the Internet.

Image
  In this blog, we are going to see how to check our react native application is connect with internet or not. I have used @react-native-community/netinfo npm i @react-native-community /netinfo Two ways to check the network status, Check the Network status once Subscribe to get Network status(It will check every second and if changes occure it will intimate) Check the Network status once If you need to check the network status when you are trigging something, EX: While making an API call, you need to check the network status and based on result we can perform action. NetInfo . fetch (). then ( state => { console . log ( "Connection type" , state. type ); console . log ( "Is connected?" , state. isConnected ); }); Subscribe to get Network status This will notify you instantly when the network fails and back online. EX: Consider YouTube, it will alter the user instantly when network fails. const [isConnected, setIsConnected] = useState ( true ); useEffect ...

Implementing Camera in React Native using react-native-camera

  Hello, React Native enthusiasts! Today, we’re diving into the exciting world of implementing a camera in our React Native applications. The camera is a powerful feature that adds significant value to our mobile applications. The Chosen Library:  react-native-camera To get started, we’ll be using the  react-native-camera  library. If you're curious about its metrics, it weighs in at over 1MB with a robust weekly download count of over 60K. Implementation Steps 1. Gradle Configuration Firstly, let’s configure the necessary Gradle files. Add the following lines: android\settings.gradle project( ':react-native-camera' ).projectDir = new File(rootProject.projectDir, '../node_modules/react-native-camera/android' ) android\app\build.gradle Use those comment, implementation project(‘:react-native-camera’) missingDimensionStrategy ‘react-native-camera’, ‘general’ //add this line defaultConfig { applicationId "com.workhallmobileapp" minSdkVersion ...