Forwarding cookies from Server Components to Route Handlers with Next.js App Router
Server Components do not automatically forward headers and cookies when making fetch requests to Route Handlers. If you need access to the request’s cookie — an auth token, for example — you need to explicitly forward the headers from the original request.
Use On-conflict to Upsert in PostgreSQL
Upserting is a convenient way to combine inserting and updating into a single idempotent statement - one that can be run multiple times with the same outcome. PostgreSQL makes this very easy with an insert statement, by using the
Create a select trigger in PostgreSQL
Triggers can be used to call a PostgreSQL function any time data is inserted, updated or deleted. But what about select? In this article, we go deep on some easy-to-copy-pasta SQL to implement our own tracking for views on blog posts.
Call Remix loaders on demand with useRevalidate
Remix loaders are functions that run server-side to fetch data before rendering a route. As of v1.10.0 the useRevalidator hook can be used to programatically call loader functions for all active routes.
Fix client server hydration error in Next.js
When conditionally rendering UI based on state that is only available in the browser, we need to dynamically import the component, and tell Next.js this should only be rendered client-side (disable SSR).
Cookies in Remix
Use Next.js 12.2 On-Demand ISR and Supabase Function Hooks to automatically refresh stale data
Next.js 12.2 introduces stable on-demand Incremental Static Regeneration (ISR). In this article we look at using Function Hooks in Supabase to subscribe to changes in the database and automatically revalidate stale pages.
How I built the back-end for Netlify’s Matterday project with Supabase
By using Netlify and Supabase together you save a huge amount of dev time. In this article, Jon reflects on why Supabase was the right tool to build the Matterday project!
Using a Row Level Security Policy to Limit the Number of Rows Inserted Per User
Constraints help to stop users racking up a huge AWS bill, but they also provide differentiation for monetisation tiers. In this article, we look at limiting the number of rows a user can write to a particular table, using Row Level Security access policies.
Creating a realtime app with Remix and Supabase
Build a SaaS Platform with Next.js, Prisma, Auth0 and Stripe
Building a SaaS Application with Next.js, Prisma, Auth0 and Stripe
This article will provide you valuable insight on what the process is to build a SaaS, as well as teach you about methods and technologies used.
Getting a job in the tech industry
Getting your first job in the tech industry can be hard! I have put together a list of things that I have found particularly useful in getting people's attention and convincing them to take the time to meet with me.
Using custom hooks to reduce component complexity
Want to learn how React hooks work? In this article we learn a bit about the built-in useState and useEffect hooks. We then look at implementing our own custom react hook that can abstract away our complex fetching and caching logic.
Simple caching with local storage
We can massively improve the performance of our application for our users. All we need to do is stop requesting the same data over and over again, expecting our users to be entertained by a loading spinner instead of displaying them the content they are looking for! In this article we look at how easy it is to implement caching using localStorage so we can display that content faster and keep our users happy!