Realtime Features for React: Easier Than You Think

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

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

  • @faizanahmed9304
    @faizanahmed9304 ปีที่แล้ว +10

    Thanks a lot! I was just looking the docs for pusher and was not understanding much and you've just dropped a video.

    • @joshtriedcoding
      @joshtriedcoding  ปีที่แล้ว +3

      Been there, at first they confused me too

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

    bro you just created a conclusion for their bad documents, that's hard to believe, YOU A LIFE SAVER.

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

    Needed this for a clock in system I’m building. Very nice tutorial 🔥.

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

    Clearer than the doc or Vercel tutorial, thanks !

  • @malamhari_
    @malamhari_ ปีที่แล้ว +1

    Thanks, this video is very helpful to grasp the basic of Pusher
    Hope you do well onwards!

  • @mateuspaula_dev
    @mateuspaula_dev ปีที่แล้ว +7

    Good video, thank you very much for sharing your knowledge. I really hope you keep producing videos with the same intensity.
    Best regards, all the best from Brazil 🇧🇷

  • @krisbude9607
    @krisbude9607 ปีที่แล้ว +10

    nice video Josh. Just one thing... I wouldn't teach other developers to use a let in a react client component instead of the useState hook. In this particular case it works because you don't have any parent component. But it is really a bad practice and should not be used in a client component to maintain state.

    • @JB2519
      @JB2519 27 วันที่ผ่านมา

      Just curious will it not work if you wrap this let component with a parent component?

  • @angzar
    @angzar ปีที่แล้ว

    Excellent Josh, great video as always. ...(ps. prisma format -> makes it so pretty)

  • @jnayehsirine6222
    @jnayehsirine6222 ปีที่แล้ว

    KEEP GOING !!!, you have such GOOOD content

  • @iamasteriix
    @iamasteriix 2 หลายเดือนก่อน

    "Hello and welcome to this video's content, accurately described by this video's title"

  • @Subhamremady
    @Subhamremady ปีที่แล้ว

    amazing bro. It was really something new for me . THnakss for the video

  • @prototyperchan
    @prototyperchan ปีที่แล้ว +4

    have you got a repo for reference? Curious how to set up the part where pusher talks to the db to preserve the state

    • @joshtriedcoding
      @joshtriedcoding  ปีที่แล้ว +2

      Good call, will update that in the description

    • @asimalqasmi7316
      @asimalqasmi7316 ปีที่แล้ว

      @@joshtriedcoding waiting for the update 👍👍

    • @joshtriedcoding
      @joshtriedcoding  ปีที่แล้ว +1

      @@asimalqasmi7316 It's available in the description now: github.com/joschan21/minimal-react-realtime

    • @asimalqasmi7316
      @asimalqasmi7316 ปีที่แล้ว

      I tried it myself before you sent the repo
      It stumbled on useRouter in app page since it wasn't clear in the video until I figured out it was imported from navigation not router.
      If you want to see my repo I'll share it here. 😁

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

    Great tutorial! But what if I have multiple channel I need to listen to? Do I need to create one useEffect per channel or put all listeners in one useEffect?

  • @murphyvanoijen6190
    @murphyvanoijen6190 ปีที่แล้ว

    @Josh,
    Great video again. Does this also work in NextJS 12?

  • @astronaut22
    @astronaut22 5 หลายเดือนก่อน

    can we use pusher to implement ads campain feature like google ads, I mean showing users data as ad in queue in real time ?

  • @siosaiafonua9286
    @siosaiafonua9286 ปีที่แล้ว +1

    can react query do the same thing? provide real time updates?

  • @crazytydoo
    @crazytydoo ปีที่แล้ว

    I love the intros to these videos, very German 😆

  • @AaronMcCloud_Me
    @AaronMcCloud_Me ปีที่แล้ว +1

    7:25 The real-time functionality

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

    thank you josh!

  • @NhanNguyen-ng7vn
    @NhanNguyen-ng7vn 10 หลายเดือนก่อน

    Today, i'm creating a chat in my school'project, and i don't khow how to unsubcribe channel_name inside return callback of UseEffect. Thanks you !

  • @TheDionysiac
    @TheDionysiac ปีที่แล้ว

    I'm not overly familiar with Prisma, but I was under the impression that you needed to set it up to work with a 3rd party DB service like Supabase or Planetscale. If so, which are you using in this project? If not, where is the database located?

    • @filipjnc
      @filipjnc ปีที่แล้ว

      Any supported dbs and hosted anywhere.

  • @acupofkoffi
    @acupofkoffi ปีที่แล้ว

    Hi. How long have you been learning web dev?

  • @edihasrin7290
    @edihasrin7290 ปีที่แล้ว

    hi josh,
    Can you explain how to use SWR for realtime data. From the info I got on Twitter, it says it doesn't use third party services / web scoket.
    i am very interested about that

    • @tnctnctnctnc
      @tnctnctnctnc 9 หลายเดือนก่อน

      Have you got your answer ?

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

    Can I use this with Strapi?

  • @alexmagwe
    @alexmagwe ปีที่แล้ว

    why dint you use useState for the input value?

  • @hn3m3s1s
    @hn3m3s1s ปีที่แล้ว

    Is it complex to setup a internal websocket on NextJS ?! 😢

    • @joshtriedcoding
      @joshtriedcoding  ปีที่แล้ว +2

      Due to NextJS being serverless and WS requiring stateful connections, you can't. That's why I found this method so convenient, alternatively NodeJS with socket.io for small scale apps is totally fine too

    • @hn3m3s1s
      @hn3m3s1s ปีที่แล้ว

      @@joshtriedcoding Isn’t it that nextjs embed expressjs, and actually have a backend? The prisma calls for example are server side, right ?

    • @joshtriedcoding
      @joshtriedcoding  ปีที่แล้ว +1

      @@hn3m3s1s Yes they are server-side. NextJS API routes use NodeJS, however, due to them being serverless, you don't have access to some APIs such as the file system. You can think of it as "every time my NextJS API gets called, I am 'renting' out a few seconds of a server's resources for this route to process the request".

    • @hn3m3s1s
      @hn3m3s1s ปีที่แล้ว

      @@joshtriedcoding Wuw, thanks for that! Very clear explanation and I understand now better how next works!

    • @eeespartak
      @eeespartak 11 หลายเดือนก่อน

      @@joshtriedcodingWhy would you recommend it for small scale apps only? What better alternatives could you name for sth like a Java api + React/Next client?

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

    THANK YOU!! the Pusher docs were so trash.

  • @haijomblo-rn8pl
    @haijomblo-rn8pl 10 หลายเดือนก่อน

    "use server" = prisma not api again 😢

  • @yacine5046
    @yacine5046 10 หลายเดือนก่อน

    That's really good, but it's paid and limited. The free version is also limited

  • @suaeb175
    @suaeb175 ปีที่แล้ว

    Thanks 🙏

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

    jump to 7:24

  • @ekchills6948
    @ekchills6948 ปีที่แล้ว

    Woow

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

    NOt helpful
    Just showing your code