Nextjs 14 Simple Filtering Tutorial Server Actions, React Query Drizzle

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024

ความคิดเห็น • 28

  • @developedbyed
    @developedbyed  8 หลายเดือนก่อน +6

    Hope you enjoy this one 🔥
    If you want to also limit the number of requests you get back, you can use something like Drizzle's gte (greater then) function with the eq function. So your paramater can have something like 50:number, so you can fiter out ids that are below 50 for example 👍👍

    • @den9943
      @den9943 4 หลายเดือนก่อน

      There is a cool article `How I Use Adapter Pattern in React` where we should adapt data to our frontend logic and structure. It looks really cool and no need in pain. I usually create an abstract function `Data Layer` (for examle: api/products-tag) and export getAll where I use ProductTagAdapter with frontend relevant interface. And then it's easy to use such functions in server actions or hooks.
      Thank you for this video. It helps me in my real project to integrate correctly react-query. I came across some issue that not all docs are updated. Some of the necessary stuff (for example keepPreviousData) I've found on the page 'Migrate'

  • @GucciKevin-qj7nb
    @GucciKevin-qj7nb 7 หลายเดือนก่อน +4

    Instead of setting onclick on Badges you can use Link Component,
    By which you can make this component a server component as well

  • @codermeloman3030
    @codermeloman3030 8 หลายเดือนก่อน +3

    Thank you! More React Query content please!

  • @Code-sz9db
    @Code-sz9db 7 หลายเดือนก่อน +4

    Hey Ed! This is a great video, but I just wanted to mention that setting up Drizzle and the schema.ts file might seem a bit confusing at first for people who are totally new to this. Maybe you could add a bit more explanation in the beginning to break it down for beginners? It might be very boring to you to explain every detail but most people who come to see this video are like absolute beginners. The video is still awesome! And you're awesome too!

  • @JustinYoung44
    @JustinYoung44 3 หลายเดือนก่อน +2

    Great pattern here with React Query. Any chance for a repo link for this one? Thanks for your great content!

  • @marginiszero
    @marginiszero 8 หลายเดือนก่อน

    This is a great video bro🔥❤

  • @mounir101
    @mounir101 8 หลายเดือนก่อน

    Very helpful. Thanks so much Ed.

  • @hellokevin_133
    @hellokevin_133 8 หลายเดือนก่อน +1

    Hey bro any plans on updating fullstack react course on your website? it's been a year !

  • @fra4897
    @fra4897 3 หลายเดือนก่อน

    not sure but usually you return data paginated, in that case you can't really do it all on the client, right? Since you want to filter the WHOLE data and show the matches (hopefully paginated as well)

  • @salieflewis
    @salieflewis 8 หลายเดือนก่อน +5

    What's the reason for making the getter function(s), i.e. getVariants, a server action versus just a regular async function?
    EDIT: I figured this out the hard way after encountering the error [Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server".]
    This still makes little sense to me, can you shed any light on why these getters need now be server actions?

  • @kristoferhokr9036
    @kristoferhokr9036 6 หลายเดือนก่อน

    I can't seem to find this anywhere - how can I fetch data using ReactQuery and consume it in a server component ? It seems like everyone is prefetching on a server component -> creating a child component to actually consume the data.

  • @SyedAlishah-w6u
    @SyedAlishah-w6u 3 หลายเดือนก่อน

    how we can add loading while filtering the data and fetching from api, is it possible?

  • @atulkumar_zip
    @atulkumar_zip 4 หลายเดือนก่อน

    You can use return type to get types

  • @webdeveloper2769
    @webdeveloper2769 8 หลายเดือนก่อน

    thank you very much bro

  • @mondistributeur326
    @mondistributeur326 4 หลายเดือนก่อน

    hi , is this in the next course? thx !

  • @dawidwraga
    @dawidwraga 8 หลายเดือนก่อน

    Isnt get varianta a server function? You are calling your db inside it and then importing it client side? Or am i misunderstanding something?

  • @ranjikanethpriya8232
    @ranjikanethpriya8232 8 หลายเดือนก่อน

    I love you man❤✌

  • @muhammadsafvankv9394
    @muhammadsafvankv9394 4 หลายเดือนก่อน

    Can you do nextjs with nodjs server seperatly also jwt auth with nextjs

  • @Alex.Shalda
    @Alex.Shalda 8 หลายเดือนก่อน

    Thanks!!! 🎉🎉🎉

  • @kiddhkane
    @kiddhkane 7 หลายเดือนก่อน

    Where's the github repo?

  • @deshraj-tiwari
    @deshraj-tiwari 8 หลายเดือนก่อน +2

    Oh god. I don't wanna say it. FIRST¿ 😂

  • @semicolon6499
    @semicolon6499 8 หลายเดือนก่อน

    What ‽

  • @semicolon6499
    @semicolon6499 8 หลายเดือนก่อน

    ¿

  • @chandrareddy9942
    @chandrareddy9942 6 หลายเดือนก่อน +1

    Why you are loading products on client side