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 minutos Do 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 minutos Today 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 minuto We 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 minuto Today 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

Middleware file in Next.js

Middleware file in Next.js

Tiempo de lectura: < 1 minuto Today I’m going to explain and provide an example of middleware in Next.js A middleware in Next.js is a function that runs before a request reaches your Next.js route or API. You can use middleware to handle and manipulate incoming requests. Cookie Management: You can read, modify, or set cookies in incoming requests. Redirects: You … Read more

Default App File for Next.js

Default App File for Next.js

Tiempo de lectura: < 1 minuto Today I bring you this _app.tsx file by default in case your Next.js project doesn’t create it. This _app.tsx file is the top-level component in Next.js. All page components are rendered through this file, making it useful for global configurations. You should place this file inside pages/_app.tsx import { AppProps } from ‘next/app’ import ‘../styles/globals.css’ … Read more

Adding path-based internationalization with i18next in React and Next.js Server Side (SSR)

Adding path-based internationalization with i18next in React and Next.js Server Side (SSR)

Tiempo de lectura: 4 minutos Returns only the HTML translated, without any added content. The first thing we have to do is to install the necessary dependencies: npm install i18next next-i18next @types/i18next @types/react-i18next –save Then we are going to create a configuration file next-i18next.config.js at the root of the project: module.exports = { debug: process.env.NODE_ENV === ‘development’, i18n: { locales: … Read more

Storing Cookies and Sharing from Client Side to Server Side in Next.js

Storing Cookies and Sharing from Client Side to Server Side in Next.js

Tiempo de lectura: 2 minutos Today we are going to learn how we can store and share Cookies between Client Side and Server Side using React. For today’s tutorial, we will use the library Nookies. This library will solve our Cookie storage immediately. First, let’s create a component called CookieStorage.tsx import nookies from ‘nookies’ enum CookieKeys { DATO = ‘dato’, … Read more