Adding In-App Subscriptions Using React Native on Android or iOS with react-native-iap

Adding In-App Subscriptions Using React Native on Android or iOS with react-native-iap

Tiempo de lectura: 2 minutosToday we’re going to learn how to add subscriptions to our application developed with React Native for Android or iOS. To make purchases in the app, we need to install the following library in our project: npm install react-native-iap Please install the current version: “react-native-iap”: “12.16.3”, Subscription purchase references for Android: https://developer.android.com/google/play/billing/rtdn-reference?hl=en Subscription Purchase References … Read more

Resolving the Expo Module Gradle Plugin Issue in React Native

Resolving the Expo Module Gradle Plugin Issue in React Native

Tiempo de lectura: < 1 minutoHoy vamos a aprender a solucionar el error de React Native: Plugin [id: ‘expo-module-gradle-plugin’] was not found in any of the following sources This error occurs because one of the libraries is incompatible with the current version. To solve it, we need to execute: npm install –check You need to update the indicated libraries. DevCodeLightdevcodelight.com

Compression function for compressing images uploaded to the web with React

Compression function for compressing images uploaded to the web with React

Tiempo de lectura: < 1 minutoYou will be sharing a function today that helps us compress images we upload to our website using an input. Código: html const compressImage = (img: HTMLImageElement, maxWidth = 1024, quality = 0.7) => { const canvas = document.createElement(‘canvas’); const ctx = canvas.getContext(‘2d’); if (!ctx) return null; const scale = maxWidth / img.width; const width … Read more

Solving issue in Expo EAS for generating an iOS build with error code 35

Solving issue in Expo EAS for generating an iOS build with error code 35

Tiempo de lectura: < 1 minutoWe are going to learn how to solve the problem today: Authentication with Apple Developer Portal failed! Security returned a non-successful error code: 36 This error occurs when we try to create the build for iOS from Flutter and ask for credentials, which we input correctly but get an error. We need to change the … Read more

Adding a 301 Redirect in Next.js

Adding a 301 Redirect in Next.js

Tiempo de lectura: < 1 minutoWe will create a 301 redirect using next.js and in this case React. We will achieve that the old URLs can be redirected to the new ones, which is good for example to apply SEO. For example, we will redirect a URL that is https://devcodelight.com/hello to https://devcodelight.com/goodbye To do this, we will first go to … Read more

How to Create a Mobile App with Local AI Using Mistral and Transformers.js with React Native

How to Create a Mobile App with Local AI Using Mistral and Transformers.js with React Native

Tiempo de lectura: 2 minutosDo you imagine an app that works with artificial intelligence without internet connection? Today I’ll show you how to use Transformers.js and a model like Mistral 7B quantized in the browser or on your mobile, without sending data to external servers. You’ll achieve total privacy by using your own device, it’s free to use, works … Read more

Show number of tests executed and passed in SonarQube with Jest, Vitest and Pytest

Show number of tests executed and passed in SonarQube with Jest, Vitest and Pytest

Tiempo de lectura: 2 minutosToday we are going to learn how to pass and display the number of tests that have been covered in SonarQube. For React with Vite: First, we install: npm install -D vitest-sonar-reporter Now, we go to the vitest.config.ts We add: html reporters: [‘default’, ‘vitest-sonar-reporter’], // JUnit reporter to generate test reports outputFile: ‘test-results/test-results.xml’, // XML … Read more

How to Change the Version of Kotlin using Expo React Native

How to Change the Version of Kotlin using Expo React Native

Tiempo de lectura: < 1 minutoWe will today learn how to change the Kotlin version used in Expo. First, we need to install expo-build-properties, which will allow us to edit native project properties without modifying anything in the android folder. html npm run expo install expo-build-properties And then we modified inside our app.json and could add the kotlinVersion: DevCodeLightdevcodelight.com

Fixing error: Text content does not match server-rendered HTML in Next.js

Fixing error: Text content does not match server-rendered HTML in Next.js

Tiempo de lectura: < 1 minutoToday we are going to fix the common error that may occur when implementing i18n in our React environment with Next.js. This is the error: Unhandled Runtime Error Error: Text content does not match server-rendered HTML. Warning: Text content did not match. Server: “” Client: “” See more info here: https://nextjs.org/docs/messages/react-hydration-error Returns only the HTML … Read more