I Tried 5 Redux Alternatives and Here is the Best one

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

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

  • @wralith
    @wralith 2 года назад +17

    I really like how Zustand solve the state problem without creating more problems to deal with, at least in the simple apps. Btw what font do u use in vscode?

    • @Yusuf007R
      @Yusuf007R 2 года назад

      yep, it just do what it have to do

    • @novaiiee
      @novaiiee 2 года назад

      Jetbrains Mono

  • @rimzzlabs
    @rimzzlabs 2 года назад +3

    Jotai is more comfortable with me, save a lot bundle size, easy peasy management, and writing functional programming is wild

  • @Andy-si1pl
    @Andy-si1pl 5 месяцев назад +3

    we dev simplified guy with a beard

  • @lactobacillo79
    @lactobacillo79 2 года назад +3

    There's also MobX which is still a valid alternative for state management.

  • @jimmyj.6792
    @jimmyj.6792 2 года назад +2

    What do you think about Valtio ? 🤔 do you already try it ?

  • @TannerBarcelos
    @TannerBarcelos 2 года назад +4

    I love Zustand - just wish you could separate state into slices like Redux. I understand that design a little better

    • @ob34915
      @ob34915 2 года назад +1

      if they are the same just use Redux, what's the point of learning Zustand

    • @golfgrab9481
      @golfgrab9481 Год назад

      it can

    • @azeek
      @azeek 11 месяцев назад

      you can do that

    • @somedude6420
      @somedude6420 11 месяцев назад

      each createStore is a slice of its own, at least that's how i understand it

  • @thegrumpydeveloper
    @thegrumpydeveloper Год назад

    Think react query and form libs need to be mentioned because those are alternatives that help offload what people think of as “global” state and help organize slices of state.

  • @rjborba
    @rjborba 10 месяцев назад

    I do not know about all the up to down approach libs… I clouds be wrong, but it always feels like a monolithic application. Too much thing in a single react component.
    Usually what I’m doing is to use JOTAI every time that I want the state to be shared among componentes and I create a custom hook to manipulate the data. This custom hook introduces all methods needed globally to manipulate data. It allows me to use things like SWR to controle the server state, for example.

  • @kelvinchin5942
    @kelvinchin5942 2 года назад

    For me, I don't think that recoil's atom cannot store function is a problem as we can export the function and give it the required fields. Maybe there's some use case that needs to store functions in a global state? I'm not sure, at least I don't encounter it yet

    • @j3k2006
      @j3k2006 2 года назад

      In recoil you can write selectors that take care of this, like a middleware between atoms and your components. Or am I missing something here, it's all quite new to me

  • @guruananda1189
    @guruananda1189 9 месяцев назад

    Why are you trying to make recoil to be like redux/zustland?

  • @pablomaidana7420
    @pablomaidana7420 Год назад

    The ones I liked the most were rematch and recoil. Missing from the list to review Mobx

  • @ju_dev
    @ju_dev Год назад +5

    Zustand is german and means state

    • @haha-eg8fj
      @haha-eg8fj Год назад +3

      And jotai is Japanese and also means state.

    • @martiananomaly
      @martiananomaly 11 месяцев назад +2

      And both are made by the same people ;)

  • @yousure9843
    @yousure9843 2 года назад +2

    i think zustand is easier, and i will vote for zustand

  • @tjcurran6041
    @tjcurran6041 2 года назад +11

    Base Redux users are masochist 😅

    • @crr4141
      @crr4141 Год назад

      Siempre pense que redux era horrible, ahora por fin veo que hay mejores alternativas

  • @zebcode
    @zebcode Год назад +1

    You talk about how jotai is super simple, but I fear your excitement got the better of the demo. Clearly, you're passionate about it, but you went way too fast for someone who is trying to get an idea about how it works. Still a great talk. I'll have to skim over it for now and research myself which is fine but because you went too fast it just makes it feel way more complex.Oh god it gets even faster after that... I had to drop it... you killed my brain. I mean I've had a day of work, I'm tired, it would really help if you'd slow down.

  • @SahraClayton
    @SahraClayton 2 года назад

    don't some people just use React-query now as a state manager if all they need to do is share data from server to components.

  • @maacpiash
    @maacpiash 2 года назад +3

    Hold on, Redux Toolkit is a Redux alternative? 😮

  • @khaledsanny4817
    @khaledsanny4817 2 года назад

    Since Zustand and Jotai are both really light ... why not just use both of them ? So for quick useState-like stores, you use Jotai and for fully managed stores you use Zustand ? what do you guys think about it ?

    • @zebcode
      @zebcode Год назад +4

      I think you should just use one thing and be consistent throughout your app. Using two systems to do similar things like that is just adding complexity and unnecessary bloat; even if it is small.

  • @thegrumpydeveloper
    @thegrumpydeveloper Год назад

    Legend state prob didn’t exist but it’s api is also nice and clean

  • @robbinluo2810
    @robbinluo2810 2 года назад

    How about usecontext?

    • @jii808
      @jii808 2 года назад +5

      useContext is good for state that doesn't change often like light/dark theme mode. useContext causes all components subscribed to it's values to re-render when a value changes. react-tracked can help improve performance of useContext but there are better solutions for frequently updated global state.

    • @thorw2136
      @thorw2136 Год назад

      ​​​@@jii808i wish I would've come accross this comment 1 month earlier.
      I don't know why people/ content creators don't tell from start what's best practices.
      They would rather teach application of usecontext and leave at that. But they hardly tell when it should be used and what are its limitations and drawbacks.
      Surprisingly enough I found out yesterday what it does after I enabled highlight component on rerender option
      In react profiler

    • @jii808
      @jii808 Год назад

      @@thorw2136 I don’t think most content creators know themselves. I’m using Zustand mostly for global state, react query for server state. Context rarely.

  • @advancedprogramming62
    @advancedprogramming62 2 года назад

    yes, easier you can use createApi

  • @Buzzilio_
    @Buzzilio_ 2 года назад +3

    Best Redux alternative I choose React useContext + useReducer

    • @pikachu5223
      @pikachu5223 Год назад +6

      context kinda sucks

    • @thorw2136
      @thorw2136 Год назад +1

      Trust me u would hate it in long run if you understand what impact it is causing once your application becomes complex and large.

    • @somedude6420
      @somedude6420 11 месяцев назад

      it's a pain to implement for us, we used it, and there's just so much to do.
      We switched to zustand, and it has never been easier

    • @Bread-vk8fl
      @Bread-vk8fl Месяц назад

      useContext + useReducer is so complicated. Jotai is SO MUCH easier to implement.

  • @hikionori
    @hikionori Год назад

    I tried Legend State manager
    Is amazing

  • @kimbapslayer1995
    @kimbapslayer1995 2 года назад +4

    I wish typescript was t the standard in RUclips tutorials anymore. It's very confusing to see as I'm still trying to understand more complex JavaScript and advanced React stuff. So to through in typescript is a little bit much for me, personally. I feel like it's only really used in very public facing production environments too.

    • @AveN7ers
      @AveN7ers 2 года назад +5

      The big channels like Net Ninja, Web Dev Simplified and Academind use JavaScript instead of TypeScript

    • @lardosian
      @lardosian 2 года назад +3

      You will get used to it, not easy at the start but you should learn it.

    • @kimbapslayer1995
      @kimbapslayer1995 2 года назад +1

      @@lardosian I feel that lol

    • @Saradomin65
      @Saradomin65 2 года назад +4

      I'm no TS expert (still learning phase). But once I touched TS, I don't feel like going back to just JavaScript, it's just that good.

    • @brunospasta
      @brunospasta 2 года назад

      Typescript is really the only tool we have right now to deal with that abomination of a language.

  • @ademyagmurlu1825
    @ademyagmurlu1825 2 года назад

    I think best alternative is easy-peasy.

  • @iiNoorbd
    @iiNoorbd 2 года назад

    Zustand >

  • @kord1327
    @kord1327 2 года назад

    Have u tried Easy peasy ?

    • @somedude6420
      @somedude6420 11 месяцев назад

      i checked, and i think zustand and easy peasy has similar implementation, for *creating a store* that is,
      except that with zustand there is no Provider

  • @97-bibhutiswain59
    @97-bibhutiswain59 Год назад

    You forgot mobx

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

    I think you mean "opinionated", not "optionated".

  • @eneiarestivan
    @eneiarestivan Год назад

    Jotai

  • @afdhaliapreto7703
    @afdhaliapreto7703 8 месяцев назад

    easy peasy redux.. 😅😅😅

  • @ashimov1970
    @ashimov1970 Год назад

    Valtio is the BEST

  • @LucasPedroso25
    @LucasPedroso25 2 года назад

    coming soon... use-state-global-redux, redux easy =)