Add i18next to Internationalize a React Native + Expo APP using TypeScript

Add i18next to Internationalize a React Native + Expo APP using TypeScript

Tiempo de lectura: 2 minutos Today we are going to learn how we can internationalize and add multi-language support to a React Native APP using TypeScript. The first thing we will do is install i18n: npm install i18next react-i18next –save Once installed, we create a folder called language and inside it, we create a file i18next.ts // i18next.ts import i18n … Read more

Fix error: Unknown compiler option ‘allowImportingTsExtensions’. Using Sonarqube with React and TypeScript

Fix error: Unknown compiler option ‘allowImportingTsExtensions’. Using Sonarqube with React and TypeScript

Tiempo de lectura: < 1 minuto Today we are going to solve the error Unknown compiler option ‘allowImportingTsExtensions’ that appears when trying to analyze a TypeScript project with SonarQube and React. The error is found in tsconfig.json of the React project, it is fixed by removing the following line: allowImportingTsExtensions”: true, DevCodeLightdevcodelight.com

Fix error Argument for ‘–moduleResolution’ option must be: ‘node’, ‘classic’, ‘node16’, ‘nodenext’.; in SonarQube with React TypeScript

Fix error Argument for ‘–moduleResolution’ option must be: ‘node’, ‘classic’, ‘node16’, ‘nodenext’.; in SonarQube with React TypeScript

Tiempo de lectura: < 1 minuto Today we are going to learn how to solve the error Argument for ‘–moduleResolution’ option must be: ‘node’, ‘classic’, ‘node16’, ‘nodenext’.; when trying to analyze a React project with TypeScript using Sonarqube. This error is located in the tsconfig.json file, as it includes: “moduleResolution”: “bundle”, To fix it, we will set: “moduleResolution”: “node”, DevCodeLightdevcodelight.com

Create RadioGroup with RadioButtons using React with TypeScript

Create RadioGroup with RadioButtons using React with TypeScript

Tiempo de lectura: 2 minutos Let’s create a RadioGroup component composed of RadioButtons. First, we create the RadioGroup component. import React, { useState } from ‘react’; import RadioGroup from ‘./RadioGroup’; // Adjust the path according to your file structure import RadioButton from ‘./RadioButton’; // Adjust the path according to your file structure const YourComponent = () => { const [gender, … Read more

Create Pagination Component for React

Create Pagination Component for React

Tiempo de lectura: 2 minutos Today I wanted to share a simple way to implement a pagination component using Material-UI in React. This component is useful when working with extensive lists, allowing navigation between different pages. First, we create the pagination component with its attributes so we can use it wherever we need it. import React from ‘react’; import Pagination … Read more

Configure SonarQube to allow analysing TypeScript and React code

Configure SonarQube to allow analysing TypeScript and React code

Tiempo de lectura: 2 minutos If you want to analyse a React project that includes TypeScript files (.ts and .tsx) with SonarQube, you’ll need to configure SonarQube to support TypeScript and adjust your project for effective SonarQube analysis settings. Below are the general steps: 1. Configure SonarQube to Support TypeScript: Ensure SonarQube is installed and running. Also, you need the … Read more