Kinda Code
Home/React/Page 8

React

React tutorials, tips & tricks
React: How to Create an Image Carousel from Scratch

React: How to Create an Image Carousel from Scratch

Updated: Mar 02, 2023
This practical walks you through the steps to implement an image carousel (slider) in React. We’ll make it from the ground up without any third-party NPM packages. No more ramble; let’s get our hands......
React: How to Detect Caps Lock is On

React: How to Detect Caps Lock is On

Updated: Mar 02, 2023
The complete example below shows you how to find out if the caps lock is currently ON when you are typing something into an input field in a React application. This will be useful in many situations, such as when a user types their......
React: How to Check Internet Connection (Online/Offline)

React: How to Check Internet Connection (Online/Offline)

Updated: Mar 02, 2023
This succinct, practical article shows you how to check the internet connection in React by using hooks. No third-party libraries are required. What Is The Point? In Javascript, there is an object called navigator that can tell......
How to Create a Word Counter in React (with Hooks)

How to Create a Word Counter in React (with Hooks)

Updated: Mar 02, 2023
This practical article shows you how to create a word counter in React (in addition, we’re going to add a character counter, since it doesn’t take much effort). A Quick Note There is a common pitfall that some......
React: Load and Display Data from Local JSON Files

React: Load and Display Data from Local JSON Files

Updated: Mar 02, 2023
This practical, succinct article shows you how to load and render data from a local JSON file in React. Without any further ado, let’s get started. Importing Local JSON Files In a React project created with create-react-app,......
React Router: How to Create a Custom Back Button

React Router: How to Create a Custom Back Button

Updated: Mar 02, 2023
This practical article shows you how to implement a custom back button in a React application that uses React Router 6 (the latest version). Besides the browser’s back button, our custom back button will add convenience and......
React Router: 3 Ways to Disable/Inactivate a Link

React Router: 3 Ways to Disable/Inactivate a Link

Updated: Mar 02, 2023
This succinct, practical article shows you 3 different ways to disable/inactivate a Link in a React application that uses React Router 6 (the latest version). We will explore the fundamentals and then apply them in a complete example.......
React: Update Arrays and Objects with the useState Hook

React: Update Arrays and Objects with the useState Hook

Updated: Mar 02, 2023
This practical and straight-to-the-point article shows you how to update objects and arrays in the state in React correctly. We’ll use the useState hook and functional components. Without any further ado, let’s get......
React: Programmatically Scroll to Bottom/Top of a Div

React: Programmatically Scroll to Bottom/Top of a Div

Updated: Mar 02, 2023
This concise and practical article shows you how to programmatically scroll to the bottom or to the top of a scrollable div element in React. The TL;DR Here is the process that we will go through: 1. Create a ref with the......
React: Removing Items from a List (Full Example)

React: Removing Items from a List (Full Example)

Updated: Mar 02, 2023
When developing web apps with React, there are innumerable cases where we have to render a list of things, such as a list of users, a list of tasks, a list of products, etc. In these situations, you might want to add a delete button to......
React: Create a Reusable Switch/Toggle Component

React: Create a Reusable Switch/Toggle Component

Updated: Mar 02, 2023
In web and mobile apps, a switch or a toggle lets users choose between a pair of opposing states, like ON and OFF, LIGHT and DARK, ACTIVE and INACTIVE, using a different appearance to indicate each state. Unfortunately, nowadays,......
Using Range Sliders in React: Tutorial & Example

Using Range Sliders in React: Tutorial & Example

Updated: Mar 02, 2023
This succinct, practical article shows you how to implement and customize range sliders in React. Everything will be made from scratch without using any third-party libraries. I won’t waste your time and bore you with......