leerob
leerob
  • 97
  • 2 601 360
The blazing fast emoji todo list
A fun demo to explain how React Server Components and Server Actions work. Open source and built with the Next.js App Router, Postgres, and Drizzle.
- emoji-todo.vercel.app
- github.com/rauchg/emoji-todo (ty rauchg)
zhlédnutí: 6 693

Video

Next.js App Router Authentication (Sessions, Cookies, JWTs)
zhlédnutí 180KPřed 5 měsíci
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! ◆ Basic: github.com/balazsorban44/auth-poc-next ◆ NextAuth: github.com/vercel/next.js/tree/canary/examples/auth ◆ Docs: nextjs.org/docs/app/building-your-applicat...
How I'm Writing CSS in 2024
zhlédnutí 55KPřed 6 měsíci
Here's the tools I'm using for CSS this year - and my thoughts on why they matter. 0:00 - Introduction 0:32 - Design Constraints 2:26 - CSS in 2024 3:50 - Build Steps? 5:04 - Streaming 6:37 - CSS Modules 7:36 - Tailwind CSS 9:49 - StyleX 12:31 - Conclusion ◆ Blog: leerob.io/blog/css ◆ PPR: partialprerendering.com ◆ Forms: github.com/vercel/next.js/tree/canary/examples/next-forms
Introduction to Next.js and React
zhlédnutí 61KPřed 7 měsíci
A hands-on introduction to the main Next.js and React concepts by building and deploying a real application. 0:00 - Introduction 0:29 - Requirements 2:24 - Package Managers 4:45 - Running Locally 6:33 - Fast Refresh 6:57 - Routers 7:57 - React 8:44 - JSX 10:14 - Components 11:15 - Props 12:25 - Composing 14:08 - Imports and Exports 15:36 - External Components 17:05 - Create Next App 19:09 - Dir...
Partial Prerendering in Next.js 14 (Preview)
zhlédnutí 32KPřed 8 měsíci
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 ◆ Demo:...
Building an email client with the Next.js App Router & Postgres
zhlédnutí 41KPřed 8 měsíci
This is a simple email client built with Next.js and Postgres. It's built to show off some of the features of the App Router, which enable you to build products that: ◆ 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...
Using Forms in Next.js (Server Actions, Revalidating Data)
zhlédnutí 140KPřed 10 měsíci
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...
My thoughts on Bun
zhlédnutí 45KPřed 10 měsíci
Bun 1.0 came out this week and it's shaking up the JavaScript ecosystem. Here's my thoughts on why it's pretty dang exciting. 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 ◆ bun.sh/blog/bun-v1.0 ◆ jarredsumner
Responding to Reddit on the Next.js App Router
zhlédnutí 32KPřed rokem
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! ◆ Reddit post: www.reddit.com/r/reactjs/comments/156m504/the_nextjs_13_app_router_has_been_a_frustrating/ ◆ Client components: czcams.com/video/6jM_0wDOw4g/video.html ◆ Incrementally adopt: czcams.com/video/YQMSietiFm0/video.html ◆ Why do Client ...
Using Images in Next.js (next/image examples)
zhlédnutí 99KPřed rokem
Using Images in Next.js (next/image examples)
Incrementally adopt the Next.js App Router
zhlédnutí 43KPřed rokem
Incrementally adopt the Next.js App Router
Are React client components bad?
zhlédnutí 30KPřed rokem
Are React client components bad?
How to give a great conference talk
zhlédnutí 5KPřed rokem
How to give a great conference talk
Code Walkthrough for Next.js 13 / Tailwind CSS / MySQL App!
zhlédnutí 36KPřed rokem
Code Walkthrough for Next.js 13 / Tailwind CSS / MySQL App!
Revisiting my React course 3 years later
zhlédnutí 15KPřed rokem
Revisiting my React course 3 years later
Building a Linktree Clone! (Next.js, React, Tailwind CSS)
zhlédnutí 47KPřed rokem
Building a Linktree Clone! (Next.js, React, Tailwind CSS)
From Figma to Tailwind CSS (Design Process + Code)
zhlédnutí 71KPřed rokem
From Figma to Tailwind CSS (Design Process Code)
Using Fonts in Next.js (Google Fonts, Local Fonts, Tailwind CSS)
zhlédnutí 166KPřed rokem
Using Fonts in Next.js (Google Fonts, Local Fonts, Tailwind CSS)
Building High-Performance Marketing Websites - Lee Robinson (React Miami)
zhlédnutí 8KPřed 2 lety
Building High-Performance Marketing Websites - Lee Robinson (React Miami)
Type-safe access to your Contentlayer with Johannes Schickling (Founder of Prisma)
zhlédnutí 4,7KPřed 2 lety
Type-safe access to your Contentlayer with Johannes Schickling (Founder of Prisma)
Building an Image Gallery with Next.js, Supabase, and Tailwind CSS
zhlédnutí 51KPřed 2 lety
Building an Image Gallery with Next.js, Supabase, and Tailwind CSS
Should you learn JavaScript before React?
zhlédnutí 18KPřed 2 lety
Should you learn JavaScript before React?
Using Next.js with Fauna and GraphQL!
zhlédnutí 9KPřed 2 lety
Using Next.js with Fauna and GraphQL!
Fastest Way to Deploy a Database (10 Seconds!?)
zhlédnutí 14KPřed 3 lety
Fastest Way to Deploy a Database (10 Seconds!?)
What is Incremental Static Regeneration? (ISR)
zhlédnutí 17KPřed 3 lety
What is Incremental Static Regeneration? (ISR)
Using Docker with Next.js (and Deploying with Google Cloud Run)
zhlédnutí 43KPřed 3 lety
Using Docker with Next.js (and Deploying with Google Cloud Run)
Using Serverless Redis with Next.js
zhlédnutí 21KPřed 3 lety
Using Serverless Redis with Next.js
What State Management Library Should I Use with React?
zhlédnutí 53KPřed 3 lety
What State Management Library Should I Use with React?
What are Web Fonts? (Best Practices for 2021)
zhlédnutí 11KPřed 3 lety
What are Web Fonts? (Best Practices for 2021)
10 Next.js Tips You Might Not Know!
zhlédnutí 70KPřed 3 lety
10 Next.js Tips You Might Not Know!

Komentáře

  • @MatthewMammola
    @MatthewMammola Před 4 hodinami

    When starting off this example, is it necessary to do some configuration before it can be used? It is immediately giving me a error upon first npm run dev - Error: connect ECONNREFUSED ::1:5432 Do i need to create a server it can communicate with before this example can be used?

  • @caseyspaulding
    @caseyspaulding Před dnem

    This was great. Thank you

  • @saadmalik899
    @saadmalik899 Před 2 dny

    Hi, I'm having a problem using authjs, when the admin deletes the user from the admin dashboard or database, then the user who is deleted should be logged out and their session cookie should be deleted but nextauth is not following that behaviour or maybe I'm not setting things up correctly, so If you have any idea about this then please let me know, and I'm using the "JWT Strategy". Thanks

  • @yetkindev
    @yetkindev Před 6 dny

    npx create-next-app --example with-tailwindcss image-gallery no need thanks 😃

  • @PalakBhatt
    @PalakBhatt Před 7 dny

    awesome

  • @sebastiannjose
    @sebastiannjose Před 9 dny

    I want to thank you for this excellent introduction to authentication in Next.js

  • @JamesNMK
    @JamesNMK Před 9 dny

    this thing definitely gonna hurt my head for a few days. thanks for the video.

  • @marcusrehn6915
    @marcusrehn6915 Před 9 dny

    It is a shame that server components can initialize context.

  • @rvgn
    @rvgn Před 10 dny

    I added the server only imports to my data access files, but I had to remove it when I wrote some import scripts. Is there a way to share data access code between my server components and CLI scripts?

  • @aleksbarylo2665
    @aleksbarylo2665 Před 10 dny

    I looks nice form first view. But if you had localisation with page router, that comes out of the box in Next 12, you won't have possibility for incremental transfer you routes from pages to app architecture. You can imagine that you have app with 2-3 years of developing by 6-9 developers, and now you should swap in one step all your entire code base to the new app router.

  • @elekerik
    @elekerik Před 11 dny

    I'm following this example to the tea and when I submit my form, in the network requests, I'm keep getting a 404 status from the server-action-reducer.js

  • @LightSpeedDevil
    @LightSpeedDevil Před 12 dny

    Authjs is still in beta 😢 When will it be ready for production?

  • @clemencizm
    @clemencizm Před 12 dny

    I just finished watching the full video. So interesting and helpfull! Ijust completed a FullStack WebDev Botcamp and after this video everything makes even more sense! By the way, for the numbers, the font that you are looking for are monospace fonts. Cheers!

  • @clemencizm
    @clemencizm Před 12 dny

    Hello! Great video! I am a UX-UI designer with some front end skills. I am diving in design system, tokens and the whole ecosystem that gravitate around it. Naturally I am wondering how to integrate Tailwind into that, and eventually landed here :) Now I am wondering why, if you took the time to properly design the UI in Figma, trying to be consistant with the spacing, etc, why you only use it as a visaul reference once you are coding? Why don't you just check the editable Figma file and read the style value? I am really curious about that, because that would explain so much about the difference between the design and first delivery on stage environment? Is it a common practice? In advance thank you for the answer!

  • @georgekrax
    @georgekrax Před 12 dny

    Then why do we need to annotate with "use client"?

    • @joostschuur
      @joostschuur Před 10 dny

      'use client' designates a client only component. This prevents a server action from being executed, which is not the same as a server component.

    • @paw565
      @paw565 Před 7 dny

      To support interactions in the browser like onclick.

  • @elie2222
    @elie2222 Před 12 dny

    I also do this. But the example is pretty small. When you start getting to 500 line files with a lot of useState and useEffect type logic I find it helpful to break it down into a folder. Not the components folder, just the folder where this code was before.

  • @mahadi-init
    @mahadi-init Před 12 dny

    please share the repo ??

  • @cubeddu
    @cubeddu Před 13 dny

    We need more videos like this! 💪

  • @germandeluca3712
    @germandeluca3712 Před 13 dny

    What ' that theme?

  • @carpye2774
    @carpye2774 Před 13 dny

    What's that theme?

    • @leerob
      @leerob Před 13 dny

      One Dark Pro Dimmed

  • @obouchari
    @obouchari Před 13 dny

    I've been doing it that way and I concluded with this rule, if the component is going to be used in multiple places it makes sense to put it in its own separate file, if it's only used in one parent component or it accompanies an exported parent component at all times I keep them is the same file. Except when you're using Next and a component needs to be flagged as a "client component", then you're forced to extract its logic to its own file.

  • @r-i-ch
    @r-i-ch Před 13 dny

    Lemme join the chorus of "oof, really can't see this as a good idea" - esp. with Tailwind, you've got a ton of code to parse if you want to refactor anything or especially work with someone(s) else on the same project. I think this implies you do a lot of solo work perhaps?

  • @willb.r2055
    @willb.r2055 Před 14 dny

    I usually write components up to 150 lines of code until I make sure everything is working fine and then start breaking them into smaller components only if I need to use some part somewher else or if they need to get larger than that

  • @TheIpicon
    @TheIpicon Před 15 dny

    won't this introduce a slight flickering in the styling until the path state is hydrated?

    • @leerob
      @leerob Před 13 dny

      Nope: next-admin-dash.vercel.app/

  • @emreq9124
    @emreq9124 Před 15 dny

    I do search components using vscode shortcuts. For example I do just Cmd + P then write component name. And bum here it is. But in your way, we have to use global search. Also css may messy. I may try in small projects but, in real world projects hell no

  • @aldenjunus9749
    @aldenjunus9749 Před 15 dny

    Thank you, I actually look for exactly this pattern for my NextJS project

  • @yachujoshi
    @yachujoshi Před 15 dny

    What's this VSCode Theme? Looks clean & minimal.

  • @user-su4rd3ml8b
    @user-su4rd3ml8b Před 15 dny

    the goat has spoken

  • @germandeluca3712
    @germandeluca3712 Před 16 dny

    Excellent video. Question, what is the theme you use in VS Code?

  • @alexpanteli3651
    @alexpanteli3651 Před 16 dny

    How is it different from useSelectedSegment

    • @DrSarge37
      @DrSarge37 Před 16 dny

      useSelectedLayoutSegment is one segment down and only available for items getting rendered in the layout file. So if you’re on /dashboard/settings that hook in the layout.js would only return “settings” whereas usePathname would return “/dashboard/settings” and can be used anywhere.

  • @AHMEDYASSER-up6yx
    @AHMEDYASSER-up6yx Před 16 dny

    What is the theme extension you're using

  • @juanpablosolanorojas
    @juanpablosolanorojas Před 16 dny

    Love next but returning a 200 on an Error from the server actions feels very very wrong

  • @togya4
    @togya4 Před 17 dny

    Naaah bro you are drunk for sure

  • @utkuonursahin1237
    @utkuonursahin1237 Před 17 dny

    Do I have to export all compound components explicitly? I mean should I default export Breadcrumb then export function BreadcrumbList(){}, export function BreadcrumbItem(){} and so on. With this way I can use Client Compound components inside Server components but I have question. Why I can't use them like export default Breadcrumb, and then no exports just Breadcrumb.BreadcrumbList = function (){}, Breadcrumb.BreadcrumbItem = function () {} if I do it in this way it gives React Client Manifest error but why?

  • @sujanbasnet7868
    @sujanbasnet7868 Před 17 dny

    I personally dont enjoy reading through large files. I get lost quick.

  • @phamtienthinh1795
    @phamtienthinh1795 Před 17 dny

    Thank you for a basic tutorial

  • @yashsolanki069
    @yashsolanki069 Před 18 dny

    Is the source code already public for this ?? This approach is quite common in enterprise application and complex codebases but i would say proprr folder structure is better than having everything in one file like this.

    • @leerob
      @leerob Před 16 dny

      github.com/vercel/nextjs-postgres-nextauth-tailwindcss-template

  • @geelemo
    @geelemo Před 18 dny

    If it's just you fine. If you're working with others, you need to clean it up fr

  • @Sindoku
    @Sindoku Před 18 dny

    I hate vertical scroll though so probably not for me

  • @omkarsheral8559
    @omkarsheral8559 Před 18 dny

    this can be solved using proper folder structure

  • @AbuBakr1
    @AbuBakr1 Před 18 dny

    No database session in nextAuth credentials strategy, hence why i prefer Lucia Auth

  • @gumilhopipoca4041
    @gumilhopipoca4041 Před 19 dny

    I would do that, but these components are usually client components, so i would have to create a new file anyway

    • @leerob
      @leerob Před 19 dny

      I actually don't mind splitting for client components, because it's basically going into "another world". Your client component gets prerendered, but then _also_ adds a script tag to run React in the browser.

    • @MichaelPresecan
      @MichaelPresecan Před 15 dny

      ​@@leerobthe "other world" is technically true, but not necessarily a natural composition mental model, which presumably React and Next are driven by. I don't mind putting a client component in a new file, but every time I do, I wish there was no such hassle.

  • @PeriklesPeriklesoglu
    @PeriklesPeriklesoglu Před 19 dny

    thanks

  • @benizukebeni
    @benizukebeni Před 19 dny

    i got this error below when using getSession() on the middleware and other page. also the cookies is suddenly got deleted in random occassion. although i did the exact same method with your example. node_modules\jose\dist\browser\lib\jwt_claims_set.js (89:18) @ default "exp" claim timestamp check failed

  • @tamsssss6765
    @tamsssss6765 Před 20 dny

    post the code?🥺

    • @tamsssss6765
      @tamsssss6765 Před 20 dny

      nvm found it on vercel! Can you do a dynamic dropdown video? =D

  • @user-ot9eb3vc2u
    @user-ot9eb3vc2u Před 20 dny

    Wow always your contents cool and helpful thanks. Please a lot clone coding course

  • @joeypizzas
    @joeypizzas Před 20 dny

    in your dashboard layout, how do you highlight the current page (products and then customers in your demo)? since usePathName is client side only, do you use headers?

    • @DrSarge37
      @DrSarge37 Před 20 dny

      If you are talking about the “All Products” in the breadcrumbs, that just looks like it’s hardcoded. However, you can mix server and client components. So if you have a left hand nav, that would just be a client component.

    • @leerob
      @leerob Před 19 dny

      Correct! Yeah, you would likely use a client component here. Going to post a follow up video here in a few days that talks about the active navigation pattern, which is similar to this.

  • @user-qk4ni7se6o
    @user-qk4ni7se6o Před 21 dnem

    I wanted to use Zustand to have my user data and token in a client-side store, the I made my <<root template.tsx>> as server component and did the "get token and user" logic there and wrapped the zustand Provider around the children of the component, since I couldn't use layout.tsx because it didn't update I used template.tsx instead is it a bad practice? what should I do? I am using Laravel as my backend service please answer I need your help

  • @sugagusto6175
    @sugagusto6175 Před 21 dnem

    state returned from action always contain: 0:[$@1, “development, null]. how to remove that?