Eliminate Automatic Backup of LocalStorage in Android/iOS with React Native Expo

Eliminate Automatic Backup of LocalStorage in Android/iOS with React Native Expo

Tiempo de lectura: < 1 minuto Today we are going to learn how we can disable the option to allow local storage backup using React Native. Inherently, Expo sets the option to store local storage remotely by default: To avoid it, we will have to set the allowBackup option to false. To do this, we go to our app.json and put: … Read more

Detecting collisions between two elements in React Native

Detecting collisions between two elements in React Native

Tiempo de lectura: 3 minutos Detect colisions between two elements using React Native. Detect collision is very useful if we want to make small games with React Native even using Expo. First, we will take reference from our element of the tutorial at Allow dragging elements on screen in React Native. DragComponent.tsx import React, { useRef, ReactNode, useState } from … Read more

Allow Dragging Elements on the Screen in React Native

Allow Dragging Elements on the Screen in React Native

Tiempo de lectura: < 1 minuto Today we are going to create a component that will allow us to drag other elements across the screen using React Native. The first thing we will do is create the component that we will call DragComponent.tsx and add the logic that will allow us to drag: < pre class=”EnlighterJSRAW” data-enlighter-language=”generic” data-enlighter-theme=”” data-enlighter-highlight=”” data-enlighter-linenumbers=”” data-enlighter-lineoffset=”” … Read more

How to put a React Native app with Expo in Immersive mode (full screen) for Android

How to put a React Native app with Expo in Immersive mode (full screen) for Android

Tiempo de lectura: < 1 minuto We will implement the Immersive mode for Android on an Expo React Native app today. The Immersive mode allows us to put an app in full-screen mode on Android. We will start by installing the necessary libraries: Expo navigation bar: expo install expo-navigation-bar Expo status bar: expo install expo-status-bar And now to hide the status … Read more

Transform Android XML Vector to SVG Using the Command Line

Transform Android XML Vector to SVG Using the Command Line

Tiempo de lectura: < 1 minuto We will learn today how to transform an Android XML vector into a vector in SVG format using the command line. With the vector in SVG, we can use it both in React, Flutter or Web. First, we will install this library (if we want to use the web version): npm install -g vector-drawable-to-svg Once … Read more

Add an SVG in React Native with Expo

Add an SVG in React Native with Expo

Tiempo de lectura: 2 minutos We will learn today how to add an SVG image in React Native using Expo. The first thing we will do is install the necessary dependencies: First react-native-svg html expo install react-native-svg And now we installreact-native-svg-transformer npm install –save-dev react-native-svg-transformer We need to configure react-native-svg-transformer. To do this, we open the metro.config.js file and add: … Read more

Add Haptic Feedback (Vibration) to a Button in Your React Native App with Expo

Add Haptic Feedback (Vibration) to a Button in Your React Native App with Expo

Tiempo de lectura: 2 minutos Reading time: 2 minutes Today we are going to learn how we can add haptic feedback to a button using React Native with Expo. Haptic feedback on a button is tactile feedback provided by a device when you press a button or perform some touch action on it. Instead of simply pressing a button and … Read more

Add a Custom Font in React Native

Add a Custom Font in React Native

Tiempo de lectura: < 1 minuto Reading time: < 1 minute Today we are going to learn how we can add a custom Font to our application project with React Native. The first thing we need to do is download a font, we can use this website: https://www.dafont.com/es/ You can download the .ttf or .otf format Important: I recommend that you … Read more