Colby Fayock

Posts

  • 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...

  • How to Add Analytics in Next.js with Plausible

    Adding analytics to your website is critical for being able to have a better understanding of how your visitors use your app including gauging performance and finding usability issues. Let’s see how we can use Plausible, a privacy-focused analytics tool, to gain insights into our Next.js App Router apps. What is Plausible? Plausible considers itself...

  • How to Send Emails in React with React Email & Resend

    Emails are one of the most impactful ways to communicate to an audience but it’s also one of the most challenging formats for developers to build consistent and great experiences. But now we have a tool in our belt that takes advantage of the UI framework we love, React, and brings it front and center...

  • How to Add a Sitemap & RSS Feed in Next.js App Router

    Sitemaps and RSS feeds may feel like dated technology, but they’re critical components of making a blog or content-driven site discoverable. Luckily, Next.js makes it super easy in the App Router to get dynamic feeds set up. What is a Sitemap? A sitemap is ususally an XML document that includes a comprehensive list of links...

  • How to Build an AI Voice Translator in Next.js with Web Speech API & OpenAI

    As the world becomes more connected, it’s even more critical to be able to communicate in languages other than our own. Using simple browser APIs and tools like OpenAI’s GPT, we can create a custom translator app that translates whatever we say to a wide variety other languages. What is the Web Speech API The...

  • How to Style Active Links in Next.js App Router

    Nearly all websites have some form of navigation and a common pattern is styling the active link, or the link that represents the current page. This is typically simple with easy access to the current path, but how does that work with the Next.js App Router? Tip: We step through a bit of context before...

  • How to Build a Blog with Next.js App Router & Headless Hashnode

    One of the biggest pain points of building a blog is figuring out where to write and mange your posts. There is no shortage of Headless CMS options out there, so its important to figure out what makes them special, including a great UX and… one that promotes your blog for you? What is Hashnode?...