I might have a new favorite state manager...

Поділитися
Вставка
  • Опубліковано 21 січ 2025

КОМЕНТАРІ • 280

  • @tinrab
    @tinrab Місяць тому +501

    Just one more state manager guys and all will be good.

    • @lovebes
      @lovebes Місяць тому +23

      bruh just one more state mamager bruh I promise bruh this is the last one bruh

    • @twisterrjl
      @twisterrjl Місяць тому +7

      just one more, c'mon

    • @ArcticPrimal
      @ArcticPrimal Місяць тому +12

      Just waiting for a state manager to become a framework similar to how react router became a framework

    • @instantmaxx
      @instantmaxx Місяць тому +4

      the next one will be the best!

    • @JayDoge
      @JayDoge Місяць тому +2

      Effector is way ahead of Zustand. Give it a try.

  • @aliaddas7938
    @aliaddas7938 Місяць тому +44

    Now we need a state manager to keep track of all these state managers.

  • @trappedcat3615
    @trappedcat3615 Місяць тому +184

    Why don't we call state managers governors?

    • @johnlombardo
      @johnlombardo Місяць тому +10

      State Comptroller?

    • @Jenkkimie
      @Jenkkimie Місяць тому +7

      Mayors. Most countries don't have governors separately but every country has mayors.

    • @emterroso
      @emterroso 19 днів тому

      Looks like there's already a state manager called @techempower/react-governor

  • @abui6914
    @abui6914 Місяць тому +133

    Trust me guys react is one state manager away from perfection

    • @oddfeeling7956
      @oddfeeling7956 Місяць тому +2

      I don't know why I find this funny

  • @ChiragAgg5k
    @ChiragAgg5k Місяць тому +141

    zustand is always gonna be my go to

    • @spicepirate
      @spicepirate Місяць тому +1

      me too 👍

    • @philheathslegalteam
      @philheathslegalteam Місяць тому +13

      Jotai

    • @FusionHyperion
      @FusionHyperion Місяць тому +2

      Pinia is great for vue

    • @tuananhdo1870
      @tuananhdo1870 Місяць тому

      @@philheathslegalteam Jotai is my ex, zustand now, You should learn zustand

    • @rajikkali
      @rajikkali Місяць тому

      @@philheathslegalteam meh, too complicated for me when it came to typing

  • @henryvaneyk3769
    @henryvaneyk3769 Місяць тому +28

    JavaScript libraries are like fashion items. They go out of fashion the moment you invest in them.

    • @MadsterV
      @MadsterV 23 дні тому

      Also, a lot of them become more popular because they are already popular. It's very much fashion.

  • @guillemgarcia3630
    @guillemgarcia3630 Місяць тому +23

    man all of this is so easy in solidjs, this vid makes me appreciate it even more

    • @luka1790
      @luka1790 Місяць тому +1

      This

    • @bholmesdev
      @bholmesdev Місяць тому +6

      Feel the same about Svelte stores. They’re conceptually very similar when you extract as classes. But there’s no need for selectors, and direct state setting is possible

    • @MadsterV
      @MadsterV 23 дні тому

      I picked up RXJS from Angular and brought it to React. Then realized I was using a fraction of RXJS and could do with a tiny implementation, so I published one myself.
      I've been using it for years in prod with no issues. No more chasing trends for me.

  • @Badadodadoop
    @Badadodadoop Місяць тому +3

    Great ad by the way, happy you’re promoting interesting companies!

  • @MaxPicAxe
    @MaxPicAxe Місяць тому +8

    Thank god you made that call at 19:51 I was about to be really frustrated.

  • @johnlombardo
    @johnlombardo Місяць тому +1

    I usually enjoy your videos as a background task but this had my full attention. Saved to watch again 👍🏼

  • @Sillyvan
    @Sillyvan Місяць тому +2

    i know its not the same but thats why i love signals.
    In svelte i can just create a signal anywhere and make "helper functions"/actions
    In svelte specifically i can also just make a Class that has methods instead of actions
    it feels a lot easier to get these patterns right without needing a state library

  • @lutfiikbalmajid
    @lutfiikbalmajid Місяць тому +4

    If you already use any of state manager, just keep it. Don't mixed up or refactor your code. Unless you create new project. I mean, in the future will be another state manager born.

  • @hlibshulzhenko2925
    @hlibshulzhenko2925 29 днів тому +1

    When Theo started a speech about URL query parameters, I thought the framework would have a way to combine local state and query strings. Anyway, it’s good that we have something new. Thanks Theo!

    • @franky47
      @franky47 29 днів тому

      Have you looked at nuqs for this? (I'm the author)

  • @UliTroyo
    @UliTroyo Місяць тому +3

    Heck yeah! I ran into David K Piano's first talk about XState years ago while looking for state machine content. I use it with Svelte for heavy UI logic.

  • @Dimonina
    @Dimonina Місяць тому +21

    New store again... My opinion is not popular, but rxjs in angular has solved all of these store problems many years ago out of the box, but the only problem is that it is difficult to learn for the majority. However, React is a super popular framework, why just can't anyone figure out a versatile solution that just works, but still we have "store" and the functions to update it, but just different syntax. The approach remains the same. This is the biggest problem imo.

    • @menmikimen
      @menmikimen Місяць тому +4

      True, angular is really good in this regard. And now, for non-complex problems, it is possible to use signals instead. ❤

    • @tvujtatata
      @tvujtatata Місяць тому

      Better than being forced to used a single opinionated option or writing own. What have you done for the community?

    • @ivanmaglica264
      @ivanmaglica264 Місяць тому +1

      I love injectable services in Angular

    • @adityaanuragi6916
      @adityaanuragi6916 Місяць тому

      I'm a React dev and am eager to learn Angular
      I just need to have discipline cuz I've heard its difficult at the start but lovely later

    • @robertg.3331
      @robertg.3331 29 днів тому +1

      The approach here is NOT the same as with the majority of state management solutions. It provides some math-grade guarantees about the correctness of the program. Not necessary for every case, just as rxjs is an overkill in many cases. No one can figure out a versatile solution because one probably doesn't exist :)

  • @markosunbro2732
    @markosunbro2732 Місяць тому +8

    They will do everything to not use signals )))

  • @Infinitay
    @Infinitay Місяць тому +5

    Are state managers the new front end framework meta?

  • @offlercrocgod
    @offlercrocgod Місяць тому +3

    As a few of the comments already mentioned just use signals, legend-state in React and the other frameworks have signals built-in

  • @rahu1gg
    @rahu1gg Місяць тому +40

    For a 4 mins read blog post it took 22 mins youtube video

    • @ThinkleTink
      @ThinkleTink Місяць тому +1

      At this point I think he does it to ensure the ragebait posts and clicks

    • @witchmorrow
      @witchmorrow Місяць тому +14

      but that's a good thing, that's entirely the point - he's adding useful comments and pointers. If you don't find his commentary useful then why are you subscribed...

    • @ThinkleTink
      @ThinkleTink Місяць тому +9

      @@witchmorrow The format used to be shorter, now it feels like the viewer is being strung along just to always hit that 30 minute video mark or close to there.

    • @javierflores09
      @javierflores09 Місяць тому +7

      Brother just read the article if you don't like the commentary, because that's like the whole point of this channel

    • @ThinkleTink
      @ThinkleTink Місяць тому +3

      @javierflores09 K

  • @FusionHyperion
    @FusionHyperion Місяць тому +24

    TLDR: Basically Pinia

    • @docmars
      @docmars Місяць тому +2

      Pinia's far superior. Having to use React hooks + other data somewhere else so I can finally use it in my stores with `useEffect` to initialize state is frustrating. This means you have to do a full initial render before initializing that state for the follow-up render.

    • @Grageth
      @Grageth Місяць тому +4

      @@docmars 100% agree. I'm watching this and being reminded why I felt Vue felt so much better when it came to state management.

    • @matteobagni1235
      @matteobagni1235 29 днів тому +1

      Basically vuex, Pinia looks already more advanced. Although this is a stand alone package

    • @robertg.3331
      @robertg.3331 29 днів тому

      Pinia is not a state machine, so basically nope.

    • @matteobagni1235
      @matteobagni1235 29 днів тому

      @@robertg.3331 not is xstate- store

  • @MadsterV
    @MadsterV 23 дні тому

    A couple years ago I wrote a really tiny (invisible in build maps) hook and did away with actions, reducers, stores and other assorted unnecessary patterns. My code became much smaller and readable.
    I added debugging tools and I'm in the process of fully transitioning to TS to enforce whatever types you want your state to have.
    The code to use it is just a couple lines. You just call the hook and get on with your life. Now every time I see these convoluted schemes, I chuckle.

  • @Diego_Cabrera
    @Diego_Cabrera 29 днів тому +1

    I found jotai before the popular “zustand” and never learned another

  • @orlvni
    @orlvni Місяць тому +4

    react context + our own state machine for life

    • @xXMorodarXx
      @xXMorodarXx Місяць тому

      useContext + useReducer is all you need

    • @docmars
      @docmars Місяць тому +1

      What do you do to avoid wasteful re-renders every time your Context state changes?

    • @upsxace
      @upsxace Місяць тому

      @@docmars there is tricks, but its not worth tbfh. If you reach that point just use zustand

    • @xXMorodarXx
      @xXMorodarXx Місяць тому +1

      @@docmars usually, you don't need to. The re-renders would result in the same virtual DOM. Computing virtual DOM is not as expensive as updating the DOM. If you still want to get rid of unnecessary re-renders, you need to use pure components and wrap them with "memo". Using "memo" the, component will usually not be re-rendered when its parent component is re-rendered as long as its props have not changed.

  • @jatiquep5543
    @jatiquep5543 Місяць тому +4

    I will never leave zustand ❤❤❤

  • @termorey
    @termorey Місяць тому +2

    Effector (and ecosystem) is the best for me in most cases

  • @miran248
    @miran248 Місяць тому

    Huge fan of tagged unions and as such i'll always lean towards apis, with a single mutating action, such as `send(action)` in this case, vs having N mutating actions (with some being deprecated, others being replacements, and so on).
    Xstate also works nicely with restate.

  • @cyb
    @cyb 23 дні тому

    xstate is actually amazing if you engineered it right you can easily transfer your logic to other frameworks

  • @TimothyJoh
    @TimothyJoh 29 днів тому +1

    This is a mess compared to using Atoms in a library like Jotai or Nanostores.
    I use Nanostores because it is framework agnostic and the Astro team recommends it and you can use it between islands.
    Transitions are just simple exportable functions. State objects are whatever you want. Works with TS flawlessly.

    • @Fernando-ry5qt
      @Fernando-ry5qt 27 днів тому

      Yeah I was thinking the same..... it feels way easier to just.... use signals/atoms.
      But hey.... you get "free" state machines

  • @salva-dev
    @salva-dev Місяць тому +2

    Very interesting... Thanks. I will try it. You should also try nanostores, from Evil Martians, super lightweight and framework independent store.

    • @zocky3282
      @zocky3282 27 днів тому +1

      Does it work on large projects, I saw RHF recommending it for multi step form

    • @salva-dev
      @salva-dev 20 днів тому

      @zocky3282 My projects are of medium size, webs and management applications for my company, and it works very well for me. If the functionalities it brings serve you (which is what you need for status management) it's great.

    • @salva-dev
      @salva-dev 19 днів тому

      @@zocky3282 In my case, I have done medium-sized projects: websites or management applications for my company. Recently I've been simplifying a lot my application architectures, because in the javascript world I think we have made the mistake of using a lot of code to do the same thing. In this aspect, nanostores gives me what I need to manage state and separate the view from the application domain and for me it has been enough and it works well in MPA applications (I have stopped doing SPA's for the same reason, to simplify developments and get as close as possible to the web standards).
      Anyway, it's just my approach, you should choose the one you feel more comfortable with for your situation.

  • @frusen_sol
    @frusen_sol Місяць тому +2

    *preact-signals* my favorite one

  • @AccelerateEffectively
    @AccelerateEffectively 20 днів тому

    The only thing better than xstate store is xstate itself. Once you got the hang of actor communication and app visualization, you never want to go back

  • @taquanminhlong
    @taquanminhlong Місяць тому

    I'd say the solidjs store is even much more beautiful, just simply creating the store with initial states in a file, define functions to get and set as you wish, export them and it just works 😂

  • @philheathslegalteam
    @philheathslegalteam Місяць тому

    FYI you can infer a key’s existence in the same object. Both Stiches and my library TW Classed rely on this. But it’s like you say HELLL to infer those types.

  • @gokulkannank3053
    @gokulkannank3053 Місяць тому

    My go to will be Akita/Elf for angular and react, by the way it supports both.

  • @JonathanDsouza-f4j
    @JonathanDsouza-f4j 29 днів тому

    A state machine so smart, it got its PHD.

  • @toutpt
    @toutpt Місяць тому +1

    I believe it is easy to implement an event driven state mngt based on the Dom 😅 I don t say it should be like this but it just work.

  • @snatvb
    @snatvb Місяць тому +1

    Writing a supported, modular, and large-scale solution on zustand is a pain. the library was not appealing.

  • @iaprogrammer
    @iaprogrammer Місяць тому +2

    by best state manager is `emittor`

  • @nicholasprice5137
    @nicholasprice5137 Місяць тому

    My favorite state manager is Phoenix Liveview - mainly because I don’t have to deal with state.

  • @lcssbr
    @lcssbr Місяць тому

    For bigger projects it's a better option but for small projects, zustand is unbeatable.

  • @peroconino
    @peroconino Місяць тому

    I really avoid using state managers in my projects, but i understand the scenario of them. Xstate looks really good, if i have a chance to use ill give it a go

  • @venicebeachsurfer
    @venicebeachsurfer 8 днів тому

    What would a useMemo with cleanup function do?

    • @versaleyoutubevanced8647
      @versaleyoutubevanced8647 5 днів тому

      evaluate once variables that cause external effects

    • @venicebeachsurfer
      @venicebeachsurfer 5 днів тому

      @versaleyoutubevanced8647 but the function is called once the component unmounts... or are you saying... unmount, calls return function, BUT only calls useMemo function if dependencies have changed?

  • @alec-dora
    @alec-dora Місяць тому +1

    Which mac are you using?

  • @dannirammi
    @dannirammi Місяць тому

    I don't know why not that many people talk's about Valtio, It makes state management super easy.

  • @-vis-2492
    @-vis-2492 Місяць тому

    The state of the art from what I see

  • @WalidAra
    @WalidAra 22 дні тому

    i guess I'll stick with redux (heavy state management) and zustand (for small medium projects) for state management

  • @rezaroohian9549
    @rezaroohian9549 27 днів тому

    How does it compare to Pinia?

  • @julianklumpers
    @julianklumpers 29 днів тому

    Does this mean if i want to persist my state, i have to convert it to a state machine first?

    • @kassios
      @kassios 28 днів тому +3

      A state machine is a modelling paradigm that explicitly describes the states of an application and the transitions between those states.
      There is an ambiguity of the word state in React and state in a State Machine.
      State is the condition an app is in. It could be Loading, Idle, Saving etc. An application that is in state Loading cannot transition to the state Saving for example.
      By modelling the states of an application you cannot land in a bad state, avoiding logical bugs.
      in xState the react "state" is the context object, so that's where your react "state" is.

  • @cocoscacao6102
    @cocoscacao6102 Місяць тому +1

    Still using DI + RxJS...

  • @advancedprogramming62
    @advancedprogramming62 28 днів тому

    Remind me why we not just use rxjs everywhere like in Angular?

  • @rajikkali
    @rajikkali Місяць тому +15

    Pinia ❤

    • @aghileslounis
      @aghileslounis Місяць тому +2

      lol

    • @TheAlexLichter
      @TheAlexLichter Місяць тому

      I wonder how other ecosystems survive with a single state management tool 👀😂

    • @rajikkali
      @rajikkali Місяць тому +1

      @@TheAlexLichter I know, right? We need 20 different solutions, learning a new one every time you switch jobs,

  • @andrewredican1413
    @andrewredican1413 29 днів тому

    Among equally clever and stupid things I've done is having the entire state managed with rxjs and encoded and compressed as a url to make whatever application state book.arkable and shareable so long as the user is authorised

    • @MadsterV
      @MadsterV 23 дні тому

      oh god!

    • @andrewredican1413
      @andrewredican1413 23 дні тому

      In case it wasn't obvious, there is a limit to how urls can be, so it is not a great idea to attempt putting encoded state

  • @0xmg
    @0xmg 29 днів тому

    That MF drop was personal 😂

  • @SithLordBishop
    @SithLordBishop 7 днів тому

    I love xstate for app startup flows and complex state flows but I limit it to those cases. Zustand is amazing in react projects. I have yet to need something like zustand in svelte.

  • @VenRoot
    @VenRoot 29 днів тому

    Another week, another react state management library

  • @Ked_gaming
    @Ked_gaming Місяць тому +6

    99% of the time you dont need a store, dont thank me

    • @Simon-ir6mq
      @Simon-ir6mq Місяць тому

      Yeah tbh I don't actually get the appeal of a store. Is it that people want to feel less bad about using global variables? Or is it that you want a standardized interface for update event propagation? In case it's the latter, you could just have a file where some globals are declared, as well as some functions to update/listen.

    • @robertg.3331
      @robertg.3331 29 днів тому

      ​@@Simon-ir6mq "functions to update/listen" - you mean, like 'useState' for listening and the returned setter for updating?

    • @kassios
      @kassios 28 днів тому

      ​@@Simon-ir6mq I have an Excel like application that receives notifications for validation or actions from other users and without a State Machine (like the xState) it is a nightmare to handle with some global parameters.
      The application needs to respond (or not) based on the users input, the condition the application is in (maybe saving/calculating or loading).
      The difference of xState is that you model the states (the conditions) your component can be in and the transitions that are allowed from each condition (called state).
      If you don't do that, then the states of your application are implied in the code and in the head of the developer.
      So I agree that React state is 100% good for 95%, but for complex modelling of an application I would go with xState to explicitly describe all the conditions and transitions that can happen.

    • @Fernando-ry5qt
      @Fernando-ry5qt 27 днів тому

      @@Simon-ir6mq A simple appeal is the helpers that come with the store, subscribing to a global on react in order to make it act when mutated requires a bit of a boilerplate
      another one is the probability of your build tool messing with you, does not happen that often these days but oh boy..... some time ago it did a lot haha.
      Finally, on larger teams is usually easier to train people about the global state when it is structured with a well known and popular solution instead of an inhouse one.
      but you are right about it being possible using globals, it is just move inconvenient

  • @todpale
    @todpale Місяць тому

    This is Pinia for React. And Pinia is just great.

  • @lonewolf36s
    @lonewolf36s Місяць тому

    pretty much everything i have is in redux.
    So many slices...
    Maybe in future on a new project i'd try this. It looks REALLY clean.

  • @kamleshbachani8132
    @kamleshbachani8132 Місяць тому

    The type inferring is what could make me switch to this

  • @manylovv
    @manylovv Місяць тому

    writing explicit types for a zustand store is soo annoying, so this looks like a good alternative

  • @osamahima6698
    @osamahima6698 24 дні тому

    Why is no one talking about signals? Like preact-singnals, it's really damn good for small to medium state management

  • @aaronmoroney2066
    @aaronmoroney2066 Місяць тому

    Effector! Is really good

  • @pch9548
    @pch9548 29 днів тому

    We need state manager manager.

  • @esequielalbornoz5271
    @esequielalbornoz5271 19 днів тому

    The only thing I don't like about this in 10:12 is that you can not rename the transitions project-wide.

  • @St0rMsk
    @St0rMsk Місяць тому

    That Leo meme from once upon a tim e a hollywood, poining on a TV and titled: Tha'ts PINIA, that's pinia for React

  • @jntaca
    @jntaca 28 днів тому +2

    As a VUE developer, since Composition API + Composables we dont need store libraries anymore.

    • @rjx-dev
      @rjx-dev 28 днів тому

      And in case we need Pinia is the best!! 🫡

    • @coder_one
      @coder_one 28 днів тому +2

      This is interesting, because it contradicts the VUE documentation, which clearly and lucidly indicates when you can rely on a simple state and when you should use the official state management library - Pinia. How about rethinking your silence? Since anyone with access to the comments section can also fire up the documentation and see how much you're spouting foolishness?

    • @jntaca
      @jntaca 27 днів тому

      @@coder_one Not my problem if my comment offended someone.

    • @coder_one
      @coder_one 27 днів тому +2

      @@jntaca offended? It turns out that reading with understanding is not your strong point....

    • @jntaca
      @jntaca 27 днів тому

      @@coder_one keep trolling, anomymous abject.

  • @h3mmm
    @h3mmm Місяць тому

    react-observing is the best.

  • @StephanHoyer
    @StephanHoyer Місяць тому +1

    Again a problem you would not have if you would not diff a change twice in react. Just drop setState and redraw the whole thing.

  • @HomyachidzE
    @HomyachidzE 28 днів тому

    Effector realy cool. Try this!

  • @tomaszp2580
    @tomaszp2580 Місяць тому

    I agree with AG-Grid 100%

  • @itsMapleLeaf
    @itsMapleLeaf 29 днів тому +1

    the blind favoritism and non-sequiturs in these comments is amazing

  • @buthow900
    @buthow900 Місяць тому

    Have you seen ombistac zedux?

  • @BobKane-g6x
    @BobKane-g6x Місяць тому

    That's what you said last week.

  • @nChauhan91
    @nChauhan91 Місяць тому +13

    Been using it for 3 years in a project, it's good for things but I wouldn't recommend it for general state management

    • @graficandorealidades7561
      @graficandorealidades7561 Місяць тому +5

      Thanks, you saved me 22 minutes of my life

    • @t3dotgg
      @t3dotgg  Місяць тому +13

      xstate-store is not 3 years old and is very different from traditional xstate

    • @nChauhan91
      @nChauhan91 Місяць тому

      @@t3dotgg my bad, I thought this was just xState library that David created.

    • @jatiquep5543
      @jatiquep5543 Місяць тому +2

      ​@@t3dotgg he should have called it another name as a new library

    • @johnlombardo
      @johnlombardo Місяць тому

      @@jatiquep5543 What, like XStore? Or my suggestion, Store Manager For People That Like How XState Works.

  • @christopherkiessling
    @christopherkiessling Місяць тому

    How about performance? I feel like going back to the cavern age if the state manager is not fixing React truly reactiveness in an easy and elegant way

  • @ponk___
    @ponk___ Місяць тому

    Please why does not react have something like pinia and setup stores ?
    Those are awesome

  • @ronny584
    @ronny584 Місяць тому +1

    Theo has bless us with a 23 minutes video and not 3hrs, thank goog.

  • @chewbaptiste
    @chewbaptiste 28 днів тому

    state managers never seem to fix my internal state :(

  • @ChazZeromus
    @ChazZeromus Місяць тому

    components ads are my shit now

  • @MirkoVukusic
    @MirkoVukusic Місяць тому +1

    I'm on Legend State and don't see a reason o change

  • @matteobagni1235
    @matteobagni1235 29 днів тому

    It often looks like react community takes a year to process advancement of the vue community

  • @deezydoezeet
    @deezydoezeet Місяць тому

    sticking with zustand

  • @ApprendreSansNecessite
    @ApprendreSansNecessite Місяць тому

    I really like this mentality of separating things from React, that's why I'm still fond of redux. I don't like this trend of coupling everything to react, now we're even coupling to remix/next. It reminds me of jQuery solutions which barely used any functionality of jQuery but still required that dependency. I want my code to be portable but also to outlive trends. If I'm deeply coupled to something that is likely to change, I'll have to change it for reasons other than it needing to change.

  • @ArcticPrimal
    @ArcticPrimal Місяць тому

    Just waiting for a state manager to become a js framework similar to how react router

  • @andrewredican1413
    @andrewredican1413 29 днів тому

    Ag grid is awesome. It used in Dell

    • @MadsterV
      @MadsterV 23 дні тому

      why use a grid library when we have CSS grids?

    • @andrewredican1413
      @andrewredican1413 23 дні тому

      @MadsterV Not sure if this is a serious question or just bait, but I am inclined to answer anyway. Things like virtual/infinite scrolling with server-side fetching is a must for handling large datasets. If you’ve worked with serious data sizes and new to display all that info FAST and without crashing the browser, while still be able to query/filter data and do pagination, you’d know performance isn’t about making it look pretty. Check the docs. 'Pretty' CSS tables there are dime a dozen, but I take your meaning, for trivial stuff CSS implementation is fine

  • @klond90
    @klond90 Місяць тому

    Try effector. It’s so good to write logic there.

  • @Mavesound
    @Mavesound Місяць тому

    I gave up on state management since server components

  • @guxit
    @guxit Місяць тому +2

    Valtio is an overlooked state manager that would simplify that agora zustand entanglement. People seem to avoid it because it's so simple. That's why I like it though.

    • @someDudeOnYtb
      @someDudeOnYtb Місяць тому +1

      Recently discovered it working on a react native project and I think I will start using it in everything,react or vue or vanilla

    • @dzigizord6567
      @dzigizord6567 Місяць тому

      Its buggy for computed values, I spend days replacing mobx with it on a new rework on job project only to be needing to replace it again because it fucking sucked with bugs

    • @tuananhdo1870
      @tuananhdo1870 Місяць тому

      For me valtio is more verbose

  • @diadetediotedio6918
    @diadetediotedio6918 Місяць тому +1

    Would not it be clearer in react if you just made an utility, like:
    function effect({ deps, run, cleanup }: { deps: any[], run: () -> void, cleanup: () -> void }) {
    useEffect(() => {
    run();
    return cleanup;
    }, deps);
    }
    that you can then use like this:
    effect({
    deps: [slug],
    run: () => {
    ...
    },
    cleanup: () => {
    ...
    }
    })
    I feel like at least some of the problems with useEffect is that it is too much quirky to use, so wrapping it maybe provide some benefits.

    • @requindr
      @requindr Місяць тому

      I feel like you shouldn’t do a wrapper that doesn’t provide benefits, at best it will only confuse other devs

    • @diadetediotedio6918
      @diadetediotedio6918 Місяць тому

      @@requindr
      My whole point is that it does provide benefits (semantic ones), lol. And if someone gets confused by this I don't think this person is a programmer, those are literally plain english words with well defined meanings in react, I'm not presenting a theorem proof in modal logic.

  • @raghbirsingh8585
    @raghbirsingh8585 29 днів тому

    Just use signals, and make services like angular

  • @snowofice
    @snowofice Місяць тому +2

    Zustand sounds German (translates to status) and as such you should propably pronounce it more like tsustant.

    • @addn07
      @addn07 28 днів тому +1

      it's more like [tsu-shtant] but Theo already mentioned that he doesn't care

  • @MarkVonBaldi
    @MarkVonBaldi Місяць тому

    Unpopular opinion: I think MobX is the most complete and unverbose (and easier to hop in) state managment library.

  • @twilightdev
    @twilightdev Місяць тому

    stores popping out more often than js frameworks (well technically they are js frameworks too but still)

  • @KabobTech
    @KabobTech Місяць тому

    Is it crazy if I like valtio

  • @nathanaelbennett8286
    @nathanaelbennett8286 Місяць тому +1

    state management considered harmful

  • @random-i2s
    @random-i2s Місяць тому +1

    Why is the FE world like this? Why do we need a new framework, state manager, editor, runtime, additional languages on top with build steps nonsense every single day? In the backend world languages has left these trivialities behind and for example go, c#, php, java communities are not into this at all . They focus on the things that matter which means we have a stable environment with mature tooling

    • @VonCarlsson
      @VonCarlsson Місяць тому

      The Java community is just as guilty of making things way more complex than they have any right to be (how many competing build systems are we up to now? 5?). The issue doesn't stem from any one language or language ecosystem, but rather comes from a culture hyper-focused on delivering new features to the detriment of virtually everything else.
      Naturally the low barrier to entry, poor standard library, and so on likely are contributing factors, but I don't think they're the primary ones.

  • @notarealperson9709
    @notarealperson9709 Місяць тому

    Hypermedia as the engine of application state (HATEOAS)

  • @pikavecordis5056
    @pikavecordis5056 Місяць тому

    xstate realized how unusable their api is, so instead they copied every other state management library. Love it!

  • @AVidhanR
    @AVidhanR Місяць тому

    13:00 no idea what he's saying like nothing 😅

  • @ThugLifeModafocah
    @ThugLifeModafocah Місяць тому

    yeah, fuck the airbnb rules... those got me crazy