Kinda Code
Home/React/Page 10

React

React tutorials, tips & tricks
Live email validation in React (with Regex)

Live email validation in React (with Regex)

Updated: Feb 13, 2023
This article shows you how to validate email addresses while the user is typing in React (live validation). Summary Here’re the points: We’ll use Javascript regular expression so that no third-party library is......
React: “I agree to terms” checkbox example

React: “I agree to terms” checkbox example

Updated: Feb 13, 2023
Terms of service (aka TOS) are the legal agreements between a website or an app and a person who wants to use that service. Usually, before a user registers an account, there will be a checkbox asking them to agree before they can......
How to use Font Awesome icons in React

How to use Font Awesome icons in React

Updated: Feb 13, 2023
This article will show you how to use Font Awesome icons in a React app. Firstly, let’s install the necessary packages: npm i @fortawesome/react-fontawesome npm i @fortawesome/free-solid-svg-icons npm i......
Axios: Passing Query Parameters in GET/POST Requests

Axios: Passing Query Parameters in GET/POST Requests

Updated: Feb 10, 2023
This quick and at-a-glance article shows you how to pass query parameters in a GET or POST request when using Axios, a very popular Javascript HTTP library. Passing Query Params in a GET Request Axios syntax for GET......
Axios: Set Headers in GET/POST Requests

Axios: Set Headers in GET/POST Requests

Updated: Feb 10, 2023
This quick and straight-to-the-point article shows you how to set headers when sending GET and POST requests with Axios. Without any further ado (like talking about what Axios is or rambling about its history), let’s get......
Axios: How to Set Timeouts for Requests

Axios: How to Set Timeouts for Requests

Updated: Feb 10, 2023
In Axios, the default timeout is 0. This quick and straightforward article shows you a few ways to set custom timeouts when making HTTP requests with Axios. Set Timeout for a single Request You can set a timeout for an individual......
2 Ways to Cancel a Request in Axios

2 Ways to Cancel a Request in Axios

Updated: Feb 10, 2023
This concise and straight-to-the-point article shows you 2 distinct ways to cancel a recently sent request in Axios. Without any further ado, let’s get started. Using AbortController If you’re developing a project......
How to use react-ga to track your React website traffic

How to use react-ga to track your React website traffic

Updated: Jan 19, 2023
This tutorial shows you how to track your React app (or website) traffic with Google Analytics. Prerequisites To follow this tutorial, you should have the following: A Google Analytics account Basic React knowledge......
Passing Data from a Child Component to the Parent in React

Passing Data from a Child Component to the Parent in React

Updated: Jan 19, 2023
In React, passing data from a parent component into a child component is quite easy with “props”. On the other hand, passing data from a child component to a parent component is a little more complicated, and you will......
React + MUI: Create Dark/Light Theme Toggle (updated)

React + MUI: Create Dark/Light Theme Toggle (updated)

Updated: Jan 19, 2023
Modern web apps often have both a light theme and a dark theme so that users can choose what works best for them. The light theme is suitable for daytime use, while the dark theme is suitable for night use and reduces eye strain as......
React: Make a simple line chart with Ant Design

React: Make a simple line chart with Ant Design

Updated: Jan 19, 2023
This article shows you how to draw a simple line chart in React with the help of the Ant Design Chart library. 1. Installing the package: npm install @ant-design/charts 2. Implementing the line chart in React code: import......
React: Firebase App named ‘[DEFAULT]’ already exists

React: Firebase App named ‘[DEFAULT]’ already exists

Updated: Aug 26, 2022
When developing a React application with the Firebase package, I ran into the following error: Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app). More information I got from my console: Uncaught......