Adding a Theme in React to Change Element Colors and Text Font.

Adding a Theme in React to Change Element Colors and Text Font.

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute Hello, today we are going to learn how to add a theme to customize the colors displayed in the theme of our React website. For this tutorial, we will use Material UI. First, we install the necessary dependencies: npm install @mui/material @emotion/react @emotion/styled Now, let’s create our theme by creating … Read more

Adding GDPR European Ad Consent Message with React Native Google Mobile Ads (ADMOB) with Expo

Adding GDPR European Ad Consent Message with React Native Google Mobile Ads (ADMOB) with Expo

Tiempo de lectura: 2 minutos Today we are going to learn how we can add the mandatory ad consent message to comply with GDPR. The first thing we need to do is to have our message set up: https://devcodelight.com/mensaje-consentimiento-conforme-rgpd-para-admob/ NOTE: I am using version 12.2.0 of react-native-google-mobile-ads at least (https://github.com/invertase/react-native-google-mobile-ads) Once configured, let’s go to android/app/proguard-rules.pro and add: -keep class … Read more

Implementing Google Consent for GDPR with React Native

Implementing Google Consent for GDPR with React Native

Tiempo de lectura: 2 minutos Today we are going to learn how we can implement the GDPR consent message with React Native. Let’s install the following library (https://www.npmjs.com/package/@ulangi/react-native-ad-consent) npm install @ulangi/react-native-ad-consent –save Now let’s add this key in info.plist of iOS: <key>GADDelayAppMeasurementInit</key> <true/> Now we open AndroidManifest.xml in case of Android. And add: <meta-data android:name=”com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT” android:value=”true”/> <uses-library android:name=”org.apache.http.legacy” android:required=”false”/> And … Read more

Connect a React Native Application to a WebSocket

Connect a React Native Application to a WebSocket

Tiempo de lectura: 2 minutos Today we will learn how to connect our React Native application to a WebSocket using the https://www.npmjs.com/package/react-native-websocket library Setting up React Native Application Create a New React Native Project: Create a new React Native project using react-native-cli: npx react-native init MyReactNativeApp cd MyReactNativeApp Install WebSocket Dependencies: Install the react-native-websocket library to handle WebSocket connections in … Read more

Connect a React Application to a WebSocket

Tiempo de lectura: < 1 minuto Today we’re going to learn how to connect our web application developed with React to a WebSocket. Configuration of the React Application Create a New React Project: Create a new React project using create-react-app: npx create-react-app my-react-app cd my-react-app Install WebSocket Dependency: Install the react-websocket library to handle WebSocket connections in React: npm install –save … Read more

Descubre las Ventajas de Utilizar React en tu Desarrollo Web

Descubre las Ventajas de Utilizar React en tu Desarrollo Web

Tiempo de lectura: 2 minutos In the world of web development, choosing the right framework can make the difference between a mediocre application and an exceptional user experience. Among the available options, React stands out as a powerful and versatile tool. Here are its main features: Virtual DOM for efficient performance: React uses a Virtual DOM that significantly enhances application … Read more

Fix bug in React Native Expo: The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.

Fix bug in React Native Expo: The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.

Tiempo de lectura: < 1 minuto Today we are going to learn how to fix an error that occurs when creating a new project with Expo and TypeScript. This error is: The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build. This might happen in subprojects that apply the Kotlin plugins … Read more

Pass a parameter/attribute from one React screen to another

Pass a parameter/attribute from one React screen to another

Tiempo de lectura: 2 minutos Hello, today we are going to learn how we can pass a parameter from one React screen to another. Step 1: Installing React Router v6 If you haven’t already, install React Router v6: npm install react-router-dom@next Step 2: Configuring React Router In your App.js file, set up routes using BrowserRouter and Route: // App.js import … Read more

Creating a Fragment with React

Creating a Fragment with React

Tiempo de lectura: 2 minutos Hello and welcome to my new article on React. Today we are going to see how we can create a fragment with React. A fragment is an area on the screen that changes when we press a button or a menu. To create this fragment, first, we are going to create the menu that allows … Read more