Tutorials

Posts

  • Lint & Format JavaScript with Biome

    Clean code is every developers dream, but getting the can often lead to wasted time obsessing over changes or arguing over code style in a pull request. Instead, we can use a linter and formatter, which will give us our clean code nirvana, with a simple command. Let’s see how with Biome. What is a...

  • MDX in Next.js

    MDX is one of, if not, the most popular ways to manage content as a developer, but configuring an app to use it can prove to be a challenge. Let’s see how we can set up MDX in a Next.js App Router app. What is MDX? MDX is a content format that combines Markdown with...

  • Light & Dark Mode Favicons

    Favicons are one of the basic building blocks of building a website and adding one isn’t anything new, but gone are the days where we’re forced to use .ico files, where instead, we can take advantage of formats like SVG to create adaptive experiences based on your visitors system appearance. What are Adaptive Images? An...

  • Pagination in React with Next.js & Drizzle ORM

    Pagination is a great way to improve the the way your visitors use your app, allowing them more easily get to the data the need. We’ll see how we can easily add a pagination component to our React app and even use Suspense to prevent it from impacting performance! What are we going to build?...

  • Generate a PDF in React

    PDFs have given the world a common format for sharing documents and media in a way that is highly compatible among a wide variety of devices, but it can often be tricky to generate them programmatically. We’re going to explore some options for how we can generate a PDF using JavaScript in different environments. The...

  • Build a Web Scraper with Puppeteer & Next.js API Routes

    Web scraping is a common technique to programmatically get valuable information from a website that might not have a publicly accessible API. Let’s see how we can easily build our own web scraper endpoint using Next.js App Router API Routes and Puppeteer. What is a Web Scraper? A web scraper is a tool that uses...

  • How to Fix CORS Errors & Allow Cross-Origin API Requests

    Modern tools allow you to build API endpoints right inside your framework with safe defaults to prevent cross-origin attacks. But what if you want to make a request from another host? What if you want to make sure it’s only one host, or a couple hosts, but not ALL hosts? Let’s see how we can...

  • How to Build a Notification System in Next.js with Knock

    Communication is critical to any product or service and while a single email blast might be straightforward, what if you wanted you wanted more control over how or when that email was being sent? Like based on when someone interacts with part of your app? Or different messages based on who they are? That sounds...

  • How to Create a Modal in React with HTML Dialog

    Modals aren’t anything new, but gone are the days that we need to install bloated libraries to one to our app. Instead, let’s see how we can drop in a new modal to a React app using the HTML Dialog element. What is modal or dialog? Modals and dialogs are similar UI patterns, but with...

  • How to Create an Add to Calendar Button in React with Tailwind CSS

    Calendars run the world (at least mine), but constantly creating new events for the things you care about can be a pain, which is also true for your visitors adding your events to their calendar. So let’s fix that with an Add to Calendar button with dynamically generated calendar links. How can we dynamically generate...