Force Refresh (Reload) Screen on Screen Change with React Navigation Tab in React Native

Force Refresh (Reload) Screen on Screen Change with React Navigation Tab in React Native

Tiempo de lectura: < 1 minuto Reading time: < 1 minute If we want to force a screen to reload when it changes or is opened again in React Native, follow these steps: In our screen stack, add the following property: options={{unmountOnBlur: true}} By adding this property, unmountOnBlur will unmount the component and remount it every time we open it, ensuring … Read more

Issue with Uppercase HTTP Headers and Axios in React Native

Issue with Uppercase HTTP Headers and Axios in React Native

Tiempo de lectura: < 1 minuto Reading time: < 1 minute When using axios and attaching a header, like in the following example: const config = { headers: { "Content-Type": "application/x-www-form-urlencoded", "TOKEN-AUTH": token } }; We need to be careful with headers that have uppercase letters because axios automatically converts them to lowercase. If our backend server expects to receive the ... Read more

Refreshing a FlatList in React Native

Refreshing a FlatList in React Native

Tiempo de lectura: < 1 minuto Reading time: < 1 minute If we remove or add a new item to a FlatList in React Native, we need to follow these steps: First, we need to create a boolean state: const [refreshing, setRefreshing] = React.useState(false); Then, we assign it to the FlatList using the extraData attribute: <FlatList data={itemList} extraData={refreshing} renderItem={({ item }) ... Read more

How to Send a POST Request with Axios in React Native

How to Send a POST Request with Axios in React Native

Tiempo de lectura: < 1 minuto In today’s article, I will show you how to send a POST request using URLSearchParams and the Axios library in React Native/Expo. In previous articles, I taught you how to make a GET request in React Native with Axios and how to perform a POST request with Axios in React Native. To begin, you need … Read more

Making a GET Request in React Native with Axios.

Making a GET Request in React Native with Axios.

Tiempo de lectura: < 1 minuto Reading time: < 1 minute If you want to make an asynchronous GET (ajax) call with React Native, you can’t use jQuery in this environment. Instead, you need to use Axios https://axios-http.com/es/ First, you need to install the dependency by running the following command in the console: expo install axios Once installed, you can create ... Read more

Show and hide database tables in phpmyadmin

Show and hide database tables in phpmyadmin

Tiempo de lectura: 2 minutos Reading time: 2 minutes Good afternoon, everyone, We continue with JavaScript tutorials. Today, I’m going to show you how to make an AJAX call in JavaScript to access data from an XML file. You might be wondering, what is AJAX? In a quick, clear, and concise manner, AJAX is a web development technique that allows … Read more

Adding a Loader in React Native

Tiempo de lectura: 3 minutos Reading time: 2 minutes I’m going to show you how to add a loader for loading screens in React Native. To begin, we need to create a new component called Loader.js import React, { useState } from “react”; import { View, StyleSheet } from “react-native”; import { ActivityIndicator } from ‘react-native-paper’; var setMostrarLoader; const Loader … Read more

Open Stack.Tab from a Stack.Screen contained within a tab with different NavigationContainers in React Native.

Tiempo de lectura: 2 minutos Reading time: 3 minutes I’m going to explain how to open another tab within a screen (outside the tab but within the execution stack) that already has content in our tab. For example, we have the following screen and we want to perform the navigation shown in the video: And we want to open the … Read more

Generate a View using a loop with React Native. Example: Dynamic Menu.

Generate a View using a loop with React Native. Example: Dynamic Menu.

Tiempo de lectura: 2 minutos Translated content in English: The first thing we have to do is create the component (if you don’t know what a component is, I recommend this post Create a component in React Native) that will represent our menu. In this case, I call it menu.js import React from “react”; import { StyleSheet, View } from … Read more