TanStack Query in Next.js: Full Implementation Guide!

Поделиться
HTML-код
  • Опубликовано: 15 янв 2025

Комментарии • 30

  • @كِتَابُالْيَوْمِ
    @كِتَابُالْيَوْمِ Месяц назад +4

    Believe me, I have never enjoyed a simplified explanation like this before. You are amazing. Keep it up, man. I wish you success

    • @orcdev
      @orcdev  Месяц назад +1

      Thank you so much for your kind words bro! I'm really glad to hear that. Your support means a lot! ⚔️

  • @sudu-boi
    @sudu-boi Месяц назад

    2:16 Thank you!!
    I was having errors following the official docs, this helped me fix it

    • @orcdev
      @orcdev  Месяц назад

      Awesome to hear that! You're welcome! ⚔

  • @michaelndad
    @michaelndad Месяц назад

    Thank you so much!! Covered all the points I needed to get going quickly.

    • @orcdev
      @orcdev  Месяц назад

      @@michaelndad You’re welcome! I am glad it was helpful!

  • @cant_sleeeep
    @cant_sleeeep 3 месяца назад +1

    i love your videos please bring more nextjs content and projects

    • @orcdev
      @orcdev  3 месяца назад

      I'm glad to hear you love the videos! I'll definitely create more Next.js content and projects for you. Stay tuned! ⚔️

  • @TheSuperBoyProject
    @TheSuperBoyProject 3 месяца назад +1

    Great video! Have you tried remix with tanstack query?

    • @orcdev
      @orcdev  3 месяца назад

      Thank you! No, haven't tried it yet. Any tips you have? :D

    • @TheSuperBoyProject
      @TheSuperBoyProject 3 месяца назад

      ​​@@orcdevno, I don't. But I was wondering if you had because I'm not sure if it is needed. Remix hooks provide many of the functionalities of tanstack query and I wanted to know your take on it

  • @dabbarnaresh7791
    @dabbarnaresh7791 Месяц назад

    what is different between
    normal fetch and this one
    fetch get calls how can cache, when i navigating between pages and come again same page its triggering api calls in devtools networks, actually we don't want trigger again and again api calls right?
    by default its not provide cache tanstack query?

    • @orcdev
      @orcdev  29 дней назад +1

      Great question!
      Now with Next.js 15 there is no basically much difference, except with TanStack we are getting all the properties like `isPending`, `isCompleted` etc
      Lately I'm not using TanStack on newer projects, because there really isn't much difference anymore.

    • @dabbarnaresh7791
      @dabbarnaresh7791 29 дней назад

      how?, api route ? or any otherway?

    • @orcdev
      @orcdev  29 дней назад

      @@dabbarnaresh7791 Server actions, api routes are not the way of doing things in Next.js anymore, except for some special cases.

    • @dabbarnaresh7791
      @dabbarnaresh7791 29 дней назад

      Please make a video it's helpful
      🥰🥰☺😊

    • @orcdev
      @orcdev  29 дней назад

      @@dabbarnaresh7791 Will do!

  • @ImaginativeWork
    @ImaginativeWork Месяц назад

    Why didn't you rename the "todos" queryKey?

    • @orcdev
      @orcdev  Месяц назад +1

      Good point! Should've renamed it to make it more clear :D

    • @ImaginativeWork
      @ImaginativeWork Месяц назад

      @@orcdev No worries. Thanks for your response here.

    • @orcdev
      @orcdev  Месяц назад +1

      @@ImaginativeWork You're welcome!

  • @yigitruzgaruzun7289
    @yigitruzgaruzun7289 24 дня назад

    Super

    • @orcdev
      @orcdev  24 дня назад

      Awesome! Glad you liked it!

  • @cant_sleeeep
    @cant_sleeeep 3 месяца назад

    please use kysely instead of drizzle.

    • @orcdev
      @orcdev  3 месяца назад

      Never tried Kyseli :D
      What is the difference? Why is it better than Drizzle or Prisma?

    • @cant_sleeeep
      @cant_sleeeep 3 месяца назад

      @@orcdev as far as i understand it allows querying directly but in a simpler way than drizzle, so without all the hassle

    • @orcdev
      @orcdev  3 месяца назад +1

      @@cant_sleeeep Yeah just checked it out, it's type safe, and it gives autocompletion of tables, columns etc I'll definitely try it out! Thanks on this one! ⚔

    • @theBarracuda_
      @theBarracuda_ 3 месяца назад

      from their docs:
      Kysely IS NOT an ORM. Kysely DOES NOT have the concept of relations. Kysely IS a query builder. Kysely DOES build the SQL you tell it to, nothing more, nothing less.

    • @cant_sleeeep
      @cant_sleeeep 3 месяца назад

      @@theBarracuda_ boo hoo