An essential part of our work as developers is to build forms, that allow our end users to provide input to our applications. There are multiple approaches on how to build and manage forms with React and in this tutorial I want to present my preferable way. Multiple times I’ve seen forms where…
Posts for "react-hooks"
Tabs component with React Hooks
Aleksandar Rusev
In this tutorial, we will create custom reusable Tabs component using best practices and no external libraries. In the end, we should be able to implement our Tabs component in the following way: Create the Context Create a fresh React app: We will use the Context API, in order to avoid prop drillin…
Custom Tooltip component with React and TypeScript (+ Next.js)
Aleksandar Rusev
Tooltips are an essential part of modern interfaces and most of the popular UI frameworks have such components. However, as is often the case, you might want to create a custom tooltip that is more suitable for your specific needs. I recently came across the react-tooltip library, which I didn’…
Stepper component with React Hooks and Context
Aleksandar Rusev
In this tutorial, we’re going to create a simple and easily customizable Stepper component. For the purpose of showing the Stepper component in action, I will also use the Stepper progress bar from my previous tutorial and wrap it into a Styled component. Let’s create a fresh React appli…
Modal component with Next.js with close on backdrop click
Aleksandar Rusev
This tutorial is a continuation of the previous tutorial, where I created a Modal component in a Next.js 13 application, using the pages router. In the current tutorial, I will enhance it by allowing it to close when the user clicks outside of it. I will refer to this functionality as “close o…
Modal component with Next.js – pages router
Aleksandar Rusev
In this tutorial, I will show you how to create a basic Modal component from scratch in a Next.js application with pages router. Before we start Important: Next v13 with pages router was used for this tutorial . Here is the Github repository with the source code. If you are using an older version of…
Autocomplete component with React and Bootstrap
Aleksandar Rusev
Implementing typeahead(autocomplete) functionality used to be quite challeging before the modern front end technologies were introduced.In this tutorial, I will show you how I’ve implemented typeahead feature very quickly with React and Bootstrap. Before we start Aside from React, we will also…