React
Custom React Hook Function: Create Custom Reusable React Hooks
If you have found yourself re-writing the same boilerplate React code over and over, You may be able to refactor that into a reusable custom React hook function that will save you time and help clean up your code a bit.
What Is A React Hook
React Hooks are a new feature in React 16.8, which allow us to use state and lifecycle hooks without constructor functions. They enable us to write less code, improve testability of components , and reduce potential side effects . A few weeks ago I was working on a project that had many nested components with lots of state . It became difficult to manage the state because every component depended on each other. The solution was to create higher-order components (HOC). But this caused the codebase to be bloated and become unmanagable quickly.
React State Array: Updating An Array That Is Stored Inside Of State
State is one of the most important concepts in React. It’s what allows us to build components that manage and maintain their own data, and it also enables us to create reusable components that can be shared across projects without duplicating code. But what exactly is State, and how do we use it? A component’s state is simply a JavaScript object with properties and values. The values of these properties can be changed over time (hence the name “state”) by invoking setState().
Categories
Analytics
Computers
Databases
Go
Linux
Projects
Search Engine Optimization
Web Development
- Why Sublime Text Is Worth It In 2026 From A Paid License Holder
- Web Components a Beginner Friendly Guide
- Different Types of String Encoding Using Golang
- Golang Check for Mysql Duplicate Key Error
- Docker Buildx Setup
- Docker: Important Topics & Notes
- Go Net Listener Http Server Example
- Using Go Embed Package for Template Rendering
- Notes On Testing Golang Applications
- Custom Golang Http Router With Middleware
- WordPress Self Hosted A Guided Tour To Running Wordpress Independent Of Big Hosting
- Neovim Custom File Extension Syntax Highlighting
- Importing Content From Hugo Into Wordpress
- Why I Dont Recommend Getflywheel or Wpengine for Most Wordpress Hosting
- Javascript Count Up to Number
- Golang Send Multipart Form Data to Api Endpoint
- Create an Accessible Vanilla Javascript Accordion
- Golang Create a Random String
- Go Channels Tutorial - Understanding Goroutines and Channels
- Call, Apply, And Bind Methods In Javascript
- Vanilla Javascript Carousel Slider: A Beginner's Tutorial
- Golang Image Resize and Golang Image Crop: Image Manipulation With Go Programming Language
- Frontmatter Data And Hugo Templates: How To Output Data With Hugo Static Site Generator
- Golang Read Environment Variables From File: How To Do It [Code Snippets]
- How To Create A Template Cache For Your Golang Web Application
- CSS Grid Gallery: Easy Fluid Gallery With CSS Grid and Javascript
- Custom React Hook Function: Create Custom Reusable React Hooks
- React State Array: Updating An Array That Is Stored Inside Of State
Tags
.Env
A11ty
Accessibility
AI
Alacritty
API Development
Apply
Arch Linux
Bash
Bind
Blockchain
Call
Certbot
Channels
CMS
Concurrency
Cookieless Analytics
Crypto
Css
Curl
Data
Data Migration
DevOps
Displaylink
Docker
Docker Buildx
Dotenv
Educational
Error Handling
Ethereum
Fail2ban
Feh
FOSS
Frontend Web Development
Frontmatter
Go
- Go Net Listener Http Server Example
- Using Go Embed Package for Template Rendering
- Notes On Testing Golang Applications
- Custom Golang Http Router With Middleware
- Neovim Custom File Extension Syntax Highlighting
- Golang Send Multipart Form Data to Api Endpoint
- Unit Testing Json Encode
- Go Channels Tutorial - Understanding Goroutines and Channels
- Golang Read Environment Variables From File: How To Do It [Code Snippets]
Go Application Configuration
Golang
- Different Types of String Encoding Using Golang
- Golang Check for Mysql Duplicate Key Error
- Go Net Listener Http Server Example
- Using Go Embed Package for Template Rendering
- Notes On Testing Golang Applications
- Custom Golang Http Router With Middleware
- Golang Send Multipart Form Data to Api Endpoint
- Unit Testing Json Encode
- Golang Create a Random String
- Go Channels Tutorial - Understanding Goroutines and Channels
- Golang Read Environment Variables From File: How To Do It [Code Snippets]
- How To Create A Template Cache For Your Golang Web Application
Google Analytics Alterantives
Google Business Profile Optimization
Hosting
HTML
HTTP
Hugo
Intel
JAMStack
Javascript
- Web Components a Beginner Friendly Guide
- Javascript Count Up to Number
- Create an Accessible Vanilla Javascript Accordion
- Call, Apply, And Bind Methods In Javascript
- Vanilla Javascript Carousel Slider: A Beginner's Tutorial
- Javascript For Countdown Timer | [VIDEO]
- What Is Blockchain Technology And How Does It Work?
- Hugo Website Tutorial: How To Create A Hugo Website
- CSS Grid Gallery: Easy Fluid Gallery With CSS Grid and Javascript
- Custom React Hook Function: Create Custom Reusable React Hooks
- React State Array: Updating An Array That Is Stored Inside Of State
JSON
Local Citations
Local SEO
Manjaro
Mariabdb
Multipart Forms
Mysql
Neovim
Nerd Fonts
Nginx
Niri
Noctalia
Nvidia
OBS Studio
Open Source
Oracle
PHP
PL/SQL
Privacy First Analytics
Privacy Oriented
Productivity
Qemu
Quickshell
Raspberry Pi
React
Rune
SCM Injections
Security
Self Hosting
SEO
SEO Traverse City
Server
Server Side Go
Small Business SEO
Smart Contracts
Solidity
SQL
Ssh
Static Site Generator
String Encoding
Sublime Text
TCP
TDD
Test Driven Development
Testing
Text Editor
Tools
Treesitter
UFW
UI
Unit Testing
Unzip
Vanilla Javascript
Virt Manager
VPS
Wayland
Web 3.0
Web Analytics
Web Components
Web Development
WordPress