State Management for React: Jotai From Beginners to Masters

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ม.ค. 2025

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

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

    I feeling I have found a gold mine when I found this channel. It's a fantastic way to learn both typescript and get to know the current state management options in react

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

    Have never heard or seen Jotai. So interesting these different state managers. I still think I'll just stick with Redux or React Query. I'm really loving React Query and trying to use it when I can. Appreciate the content Jack. Much love and respect my friend!

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

      Yeah, I need to do some more stuff on `react-query`. Tanner is doing an awesome job on that. And I'm intrigued about the potential of it getting integrated into Jotai so that any atom can be its own managed query.

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

    Awesome as always! Thank you, Jack.

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

    awesome work ! Clear and easy example thank you Jack

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

    Thanks for the awesome content, Jack!

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

    Jack has a really nice calm voice!

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

    Hello Jherr - this series is always interesting. Thanks.

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

    Such a good video! Thanks Jack

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

    Love the channel! Can you help me understand what's going on here? The project builds, but I just get a white, blank page.
    ./node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs
    Can't import the named export 'Children' from non EcmaScript module (only default export is available)

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

    Underrated channel

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

    We need more of jotai vs recoil or in depth on both. Would be amazing.

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

    Thank you, I will get it a try.

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

    Great content 👍🏽

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

    I'm curious, if you had to choose one or the other which would you choose between Jotai and Zustand for a state manager? Let's take managing user auth and say a cart state? I used both to write logic for managing auth state and a color palette state, I found both very good libraries but I wanted others input on if they had one what would they use.

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

      Personally I would choose Jotai because I'm fascinated by atomic state and I have a hunch that it's the future. Professionally I would choose Zustand because it's simple, conventional, and very popular.

    • @quelchx
      @quelchx 2 ปีที่แล้ว

      @@jherr thanks for the response. I was watching your video on react context as a state provider a bit ago and when you showcased Zustand , I enjoyed how simple it was to implement + it didn't cause any unnecessary re-renders (I'm comparison to say react context patterns I see). My question I guess would be with Jotai would it cause re-renders similar to react context since it needs a provider as a HOC of sorts? Not sure if I make sense or not.

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

      @@quelchx Jotai has the same performance in terms of re-renders as Zustand.
      That being said, I think there is a lot of unnecessary concern about re-renders. React is VDOM framework that is optimized to handle re-renders very quickly.

    • @quelchx
      @quelchx 2 ปีที่แล้ว

      @@jherr appreciate your input and time -- thank you 🙂

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

    5:35 tf todo do todo into the todo got me tripping brah

  • @shlomomoller7440
    @shlomomoller7440 2 ปีที่แล้ว

    Can you please make an example where adding and setting a todo use an async atom?

  • @gokulram423
    @gokulram423 2 ปีที่แล้ว

    How can access the jotai state in Axios interceptor

    • @jherr
      @jherr  2 ปีที่แล้ว

      Jotai state appears to only be accessible within the jotai atom get/set functions or in the React component context. So I would set an external value in the atom set function and then use that value in Axios. I'm assuming you are storing the JWT in an atom.

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

    Do you have sample that does not use typescript? Every sample I see are using typescript that makes me more confused

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

    React + TS + atomic design (atoms, molecules, organisms, templates, pages etc..) + Jotai = ❤️❤️❤️

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

    I am confusion

  • @lost-prototype
    @lost-prototype ปีที่แล้ว

    There's a simplicity to this that I just love.
    What would you say to people who feel it is too similar to global state?

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

      So when you say global state do you mean redux? Because there are a bunch of state managers and the my have different ways to model state.

    • @lost-prototype
      @lost-prototype ปีที่แล้ว

      @@jherr I guess the main contrast would be with prop drilling and more significantly (IMO), utility components with "onChange" callbacks littered everywhere.