The new adventures of Captain Hook

The new adventures of Captain Hook

In this post, I’d like to show you how to easily create your first custom React Hook.

Creating a custom React Hook step-by-step

In this post, I’d like to show you how to easily create your first custom React Hook.

I hope you’ve read my previous post: Ahoy Captain Hook — let’s use it as a starting point.

Custom Hooks

The reason for creating a custom Hook is to extract component logic into reusable functions.

During our previous encounter, the Lost Boys created a High Order Component (HOC) withDebounce _that allows wrapping the component’s _onChange _and onBlur _in lodash’s debounce function.

While this approach gives a lot of flexibility, we can go further and re-factor this to a custom Hook. This allows to reuse the logic and hide the implementation details with easy-to-use function.

react-hook front-end-development javascript frontend react

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How native is React Native? | React Native vs Native App Development

Article covers: How native is react native?, React Native vs (Ionic, Cordova), Similarities and difference between React Native and Native App Development.

Hire Frontend Developers

Create a new web app or revamp your existing website? Every existing website or a web application that we see with an interactive and user-friendly interface are from Front-End developers who ensure that all visual effects come into existence....

Easy way to start using React Hooks

Easy start using useState, useCallback and useEffect React Hooks In this post, I’d like to show you an easy way to start using React Hooks. All puns to Hook with Robin Williams are intended. I’m keen on using new things and luckily, I work with people who share this approach. Nevertheless, when I first read about React Hooks, I was lost like an old Peter Pan in Neverland.

React Hooks: The Difference Between useMemo and useCallback

React library provides us two built-in hooks to optimize the performance of our app: useMemo & useCallback. At first glance, it might look like their usage is quite similar, so it can get confusing about when to use each. To clear that confusion, let’s dig in and understand the actual difference and the correct way to use them both.

Hire Dedicated React Native Developer

Have you ever thought of having your own app that runs smoothly over multiple platforms? React Native is an open-source cross-platform mobile application framework which is a great option to create mobile apps for both Android and iOS. **[Hire...