Self-Hosting Next.jsleerob2024-10-08 | Learn how to deploy Next.js, Postgres, and Nginx to a $4 VPS with Docker.
I'll explain how to use and configure Next.js features like image optimization, caching & ISR, streaming, middleware, server components, and more.
0:00 Intro 1:15 Demo App 2:01 Setting up our Linux server 3:58 VPS vs. dedicated server 6:03 Vertical vs. horizontal scaling 7:08 Deploying to our VPS 17:24 Data fetching 18:03 Image optimization 21:08 Streaming 22:13 Postgres database 23:49 ISR / Caching 28:59 Middleware 29:43 Reading environment variables 31:14 Running code on server startup 32:18 Cron that hits a Route Handler 32:50 Rate limiting 33:31 Tradeoffs vs. managed services 42:25 Other options
github.com/leerob/next-self-hostForms with React 19 and Next.jsleerob2024-12-20 | Demo of building forms with the Next.js App Router and React 19 to answer questions like:
1. Why does the form clear out my input values? 2. How do I pass data from my server action to the client? 3. How do I handle client / server validation? 4. How do I display inline errors next to inputs?
Code: https://v0.dev/chat/CiFWYqPHKvT?b=b_0v5ES6AiBeqAWS DSQL (Postgres) with Next.jsleerob2024-12-13 | I tried AWS Aurora DSQL — a distributed serverless Postgres database. It's still pretty early... but I made a demo to show it off.
0:00 – Intro 0:13 – Demo 0:46 – What is DSQL? 2:06 – Distributed Data 3:34 – AWS Console 4:34 – Connecting to DSQL 6:00 – OIDC 7:33 – Code Explanation 12:56 – Vercel Observability 13:54 – Outro
Blog: nextjs.org/15-1 Code: github.com/leerob/next-saas-starterStreaming Black Friday traffic live on Vercelleerob2024-12-01 | ...MDX with Next.js App Routerleerob2024-11-30 | Learn how to use MDX and Markdown with Next.js. This tutorial explains how to configure an App Router application to use the @next/mdx plugin, change the default React components rendered with the mdx-components file convention, and discusses new changes to Next.js 15 to simplify the App Router. The code is open source and also shows how to use Tailwind CSS v4.
- Blog: nextjs.org/blog/next-15-rc2 - SaaS Starter: https://next-saas-start.vercel.app/ - App FAQs: nextjs.org/docs/app - Commerce: github.com/vercel/commerce - Interceptors: github.com/vercel/next.js/pull/70961Building PWAs with Next.js + learning neovimleerob2024-09-03 | Watch me explain a new example I'm working on for the Next.js documentation on PWAs. Oh, and I'm trying vim!Fast ecommerce with optimistic UI and Next.jsleerob2024-08-22 | Learn about the `useOptimistic` hook from React and how it's used in the Next.js Commerce demo.
• https://demo.vercel.store • github.com/vercel/commercePrevent React server code from running on the clientleerob2024-07-15 | #shorts #nextjs #vercelNext.js pattern: Active state for navigation linksleerob2024-07-12 | #shortsKeep your React components in the same fileleerob2024-07-09 | #shortsRoute Groups with the Next.js App Routerleerob2024-07-08 | #shortsBuilding with React 19 (actions + useOptimistic)leerob2024-06-17 | ...Next.js Pages / Layouts (FAQ)leerob2024-04-14 | Walking through some questions I had heard frequently!Next.js App Router Authentication (Sessions, Cookies, JWTs)leerob2024-02-05 | Learn the foundations of session based authentication through cookies in the Next.js App Router, and how community libraries like Auth.js build on top of this model. Auth is a deep topic, so let me know what else you want to see here!
- Next.js Courses: nextjs.org/learn - React Course: https://react.dev - Me: leerob.ioPartial Prerendering in Next.js 14 (Preview)leerob2023-11-10 | Learn about a new feature in Next.js called Partial Prerendering. It allows you to combine the best parts of both static and dynamic rendering in the same page. It’s available (experimental) in Next.js 14 on the latest canary releases.
0:00 – Introduction 0:18 – Partial Prerendering Demo 1:04 – How It Works 3:32 – Blog Post Deep Dive 8:51 – Another Example (leerob.io) 11:05 – Conclusion
◆ Navigate between routes in a column layout while maintaining scroll position (layouts support) ◆ Submit forms without JavaScript enabled (progressive enhancement) ◆ Navigate between routes extremely fast (prefetching and caching) ◆ Retain your position in the UI on reload (URL state)
View the code: github.com/leerob/nextjs-postgres-email-clientUsing Forms in Next.js (Server Actions, Revalidating Data)leerob2023-09-25 | Learn how to create forms and handle data mutations in the Next.js App Router. This tutorial walks through using Server Actions, creating loading and error states with useFormStatus and useFormState, as well as accessibility best practices.
0:00 – Introduction 0:06 – Demo 0:21 – Forms with Pages Router 1:05 – create-next-app 1:30 – Server Component (Data Fetching) 1:58 – Forms and action prop 3:05 – Server Actions (and useFormState) 4:32 – Progressive enhancement 5:03 – Loading states (useFormStatus) 7:13 – Revalidating data and caching 8:12 – Accessibility and error states 9:58 – Conclusion
0:00 – Introduction 0:13 – What is Bun? 0:30 – JavaScript Ecosystem 0:59 – Deno, Rome, and friends 1:41 – Bun 1.0 2:35 – CJS / ESM Discourse 3:36 – Ecosystem Compat 4:08 – Performance / Benchmarking 5:11 – Conclusion
◆ https://bun.sh/blog/bun-v1.0 ◆ twitter.com/jarredsumnerResponding to Reddit on the Next.js App Routerleerob2023-07-24 | Trying to provide a more helpful, thoughtful response to one developer's bad experience with the Next.js App Router. Hopefully this format is helpful!
#reactjs #nextjs #tailwindcssRevisiting my React course 3 years laterleerob2023-01-19 | I made a course React 2025 to teach React, Next.js, Firebase, Stripe, and more building a fullstack app. What's changed in the past 3 years? What would I do differently?
0:00 – Introduction 0:11 – Course Overview 2:54 – On Video Courses 3:56 – Databases (Firebase) 7:35 – Auth (Firebase Auth) 11:03 – NextAuth.js (Auth.js) 16:00 – Rendering & Data Fetching 25:27 – Next.js (Framework Improvements) 32:02 – Styling (CSS-in-JS, Tailwind CSS) 34:53 – Tremor UI, Other Styling Thoughts 39:58 – Other Tools + More Tailwind Talk 48:21 – Other Tools (ESLint, Prettier, TypeScript) 50:24 – Conclusion
#reactjs #nextjs #tailwindcssBuilding a Linktree Clone! (Next.js, React, Tailwind CSS)leerob2023-01-08 | Learn how to build a link-sharing application with Next.js 13, React, and styling with Tailwind CSS.
0:00 – Introduction 0:19 – Create Next App 1:20 – Defining a schema 5:27 – Setting up Tailwind CSS 7:39 – Building the UI (Avatar + Name) 16:37 – Building the UI (Links) 30:00 – Gradient background 35:21 – Flexbox & centering 39:23 – Social media icons 46:24 – Moving to the `app` directory 54:26 – Deploying to Vercel 55:31 – Vercel Edge Config 1:07:03 – Redirects 1:08:00 – TypeScript fights 1:11:46 – Updating data 1:14:25 – Granular fetch caching 1:19:45 – Conclusion
#reactjs #nextjs #tailwindcssFrom Figma to Tailwind CSS (Design Process + Code)leerob2022-12-04 | Learn what makes a great user interface, tips for working with Figma, and how to translate designs into Figma to real code with Tailwind CSS.
0:00 – Introduction 0:16 – Design Process Introduction 0:16 – Design Critique (Web) 5:05 – Design Critique (Mobile Web) 6:26 – Design Critique (Mobile App) 10:52 – Design Critique (Related Sites) 12:06 – Design Iteration 1 25:44 – Design Iteration 2 45:08 – When to move to code? 47:05 – Site Setup / Overview 54:12 – Turning the design into Tailwind CSS 1:05:09 – Conditional logic with React components 1:08:55 – Fetching real data from ESPN API 1:38:01 – Successfully connecting API data to components 1:43:35 – Handling dates and times 1:53:02 – Adding a heading with Tailwind CSS 1:56:07 – Fix images aspect ratio 1:57:06 – Conclusion
Code: github.com/leerob/ncaam Demo: https://ncaam.vercel.app Figma: figma.com/file/L4O7Rufrr0kMHG3zWax9zR/NCAAM-Site?node-id=0%3A1&t=MEqkk5FBLvOUoL0k-1Using Fonts in Next.js (Google Fonts, Local Fonts, Tailwind CSS)leerob2022-11-16 | Learn how to use the new & improved font optimization in Next.js 13, for both local and remote fonts from Google. @next/font automatically self-hosts your font files (for better privacy) *and* reduces layout shift by automatically generating a fallback font. It's pretty neat!
#nextjs #reactNext.js 13 – Introduction & Tutorialleerob2022-11-07 | We're going to build our first app with Next.js 13, including the new app directory which features improved layouts, Server Components, enhanced data fetching, and more. I'll explain the new concepts along the way and leave plenty of time for questions!
http://nextjs.org/13Building Raycast extensions with Thomas Paul Mann (CEO & Co-Founder)leerob2022-08-31 | Join this live stream to watch Lee and Thomas create a Raycast Extension using React for a native Mac application.
Live stream code: github.com/thomaspaulmann/lees-productivity-toolboxInstant serverless GraphQL backends with Grafbaseleerob2022-08-10 | Hear from Fredrik Björk, Founder & CEO of Grafbase, about the new GraphQL serverless backend and see a demo of the product.Visually building webpages in Plasmic with Yang Zhang (Co-Founder)leerob2022-06-03 | A demo of Plasmic – the visual page builder with integration into your codebase. You’ll learn about no-code, low-code, and see how Plasmic give you an interface to webpages with your own custom React components.
#nocode #lowcodeFirst look at Convex with Sujay Jayakar (Co-Founder)leerob2022-04-26 | Convex is the zero-setup, worry-free backend built for the needs of reactive app developers. Learn more about how it integrates with Vercel to build dynamic, reactive applications that scale effortlessly.
#convexBuilding High-Performance Marketing Websites – Lee Robinson (React Miami)leerob2022-04-25 | It’s “just” a marketing website they say... When in reality, developers are localizing content for visitors, running A/B tests and experiments, efficiently loading fonts and third-party scripts, improving performance and accessibility, and more. This talk will show a case study in creating high-performance marketing sites.
#reactmiami #nextjsBuilding with SvelteKit! (Nested Routes, Page Endpoints)leerob2022-04-01 | Watch me stumble trying to use my React knowledge to build a SvelteKit site with very minimal Svelte experience.
#sveltekitBuilding an Image Gallery with Next.js, Supabase, and Tailwind CSSleerob2022-03-28 | Learn how to create an image gallery with dynamic content from a PostgreSQL database, with support for content updates without needing to redeploy.
0:00 — Introduction 0:18 — Create Next App 0:37 — Running Locally 0:59 — Using Tailwind CSS (Gallery Component) 1:21 — Building an Image Component 1:51 — Aspect Ratios & Group Modifiers 2:50 — Next.js Image Component 4:50 — Blur-Up Image Placeholders 5:45 — Setting Up Supabase 6:36 — Connecting to Supabase 7:35 — Adding Data to Supabase 8:42 — Fetching Data from Supabase 10:45 — Image Gallery Demonstration 11:01 — Deploying to Vercel 12:02 — On-Demand Incremental Static Regeneration 12:38 — Supabase Function Hooks 13:51 — Revalidation API Route 14:55 — Redeploying 15:42 — On-Demand ISR Demo 16:05 — Conclusion
#tailwind #supabaseHow to Contribute to Open Source (Next.js)leerob2022-01-17 | Learn about how to make your first contribution to an open-source project. Learn about opening good pull requests, finding issues to contribute to, and more.
0:00 — Introduction 2:11 — Code of Conduct 3:11 — Opening an Issue 7:20 — Contributing Docs 8:05 — Releases (canary, stable) 9:17 — Adding Tests 11:57 — Testing against Local Versions 12:37 — Adding Warning & Error Links 14:29 — Adding Examples 17:34 — Documentation 21:02 — Pull Requests 22:25 — Feature Requests 24:22 — Examining a Pull Request 26:47 — CodeSandbox on PRs 27:47 — Example of Contributing 35:16 — Q&A 42:44 — Example of Reviewing a Pull Request 44:57 — More Q&A 48:15 — Conclusion
#nextjs #opensourceShould you learn JavaScript before React?leerob2021-11-22 | You've probably heard developers arguing both ways. But I think they're asking the wrong question...
⏱️ Timeline 0:00 — Introduction 0:41 — Why do people ask these types of questions? 1:20 — Hiring Trends 2:11 — How do you prefer to learn? 3:02 — What can bootcamps teach us about learning styles? 4:00 — Learning to Learn 4:43 — Conclusion
#javascript #reactCode Walkthrough for Next.js / Tailwind / Prisma / PlanetScale App!leerob2021-11-10 | In this stream, we'll be diving into the code for leerob.io, where I use Next.js, Tailwind CSS, Prisma, PlanetScale, MDX, and Vercel.
Code: github.com/leerob/leerob.io Site: leerob.ioUsing PlanetScale (MySQL) with Next.js and Vercel!leerob2021-07-14 | Watch us deploy a Next.js application to Vercel live, using a SQL database on PlanetScale! I'm joined by Nick, VP of Engineering at PlanetScale – a serverless database platform.
0:00 — Introduction 1:05 — Nick from PlanetScale 4:35 — PlanetScale Dashboard 7:25 — PlanetScale CLI and Database Branches 10:47 — Deploying Schema Changes 15:44 — Visualizing Deploy Requests 20:16 — Q&A 25:00 — Deploying a Next.js App to Vercel 27:40 — Application Demo 29:42 — Recap and Vercel Integration 33:07 — Viewing Data with the CLI 35:33 — Q&A
#planetscale #nextjsFastest Way to Deploy a Database (10 Seconds!?)leerob2021-07-10 | From login to a provisioned database, what is the absolute fastest way to get a database? In this video, I try out 13 different services and provide some unscientific results.
#nextjs #notionLets Talk about Developer Careers! (Hiring, Growing, and Getting Promoted)leerob2021-04-02 | Learn about my journey as a developer and how I've grown throughout my career, as well as a chance to ask any questions about hiring, growing in your career, and getting promoted!
🤝 Socials ◆ Blog: leerob.io ◆ Twitter: twitter.com/leeerob ◆ GitHub: github.com/leerob ◆ Theme/Gear/Setup: leerob.io/usesUsing Docker with Next.js (and Deploying with Google Cloud Run)leerob2021-04-02 | Updated tutorial: youtube.com/watch?v=sIVL4JMqRfc Correction: (00:03) I've published an updated version in the descriptionUsing Serverless Redis with Next.jsleerob2021-03-26 | When front-end developers are learning the full-stack, they often stumble on which backend to use. If they hear Redis, they think of in-memory caching. That's what I thought, at least. After doing more research, I was surprised to find Redis excels at hashmaps, counters, sorted lists, and even queues. It's possible to use Redis for your entire database!
This video will explore using Redis with Next.js in Serverless environments.
0:00 – Introduction 0:35 – Demo of Application 1:27 – Serverless Redis (Upstash) 2:17 – Deploying to Vercel 3:25 – Running Locally 3:44 – Connecting to Redis 4:08 – Fetching Data from Redis 4:51 – Explaining SSR (getServerSideProps) 5:09 – Explaining SWR (Client-side fetching) 5:46 — Adding Data to Redis 8:04 — Email Form and HTML Validation 9:05 – Conclusion
––––– Blog: leerob.io Twitter: twitter.com/leeerob GitHub: github.com/leerob Course: react2025.comThe Future of Mixed Reality (with Adora Nwodo)leerob2021-03-19 | Join us to learn more about the future of Mixed Reality & Artificial Intelligence from Adora Nwodo, Software Engineer at Microsoft!
––––– Blog: leerob.io Twitter: twitter.com/leeerob GitHub: github.com/leerob Course: react2025.com Gear / Coding Setup: leerob.io/uses VSCode Theme: SorcererBuilding a Netflix Clone with Next.js, Tailwind CSS, and Next Authleerob2021-03-17 | Watch me build a clone of the Netflix.com landing page live using Next.js, Tailwind CSS for styling, and Next Auth to authenticate with Google.
0:00 –Start 2:30 – Building Login with Tailwind CSS 27:50 – Next Auth (Google Sign In) 58:46 – Custom Font 1:07:03 – Q&A