Video není dostupné.
Omlouváme se.

State Management in React Native with Mobx - The Basics

Sdílet
Vložit
  • čas přidán 22. 05. 2021
  • If you're interested in MobX, you probably know a little bit about Redux. MobX is a more lightweight, flexible state management solution for your React Native app. While it isn't best for ALL apps, it's definitely an option to consider when creating new apps. This video will help you get started.
    00:15 Reviewing initial code with setState/useState
    03:40 Moving the state to a central class
    12:21 Adding observable state, actions, and computed values
    15:58 Watching state using the observer higher order component
    18:25 Rebuild specific widgets when state changes
    💻Follow along with the initial code: github.com/theflutterfactory/...
    ⚡Connect on Facebook: / flutterfactory
    ⚡Connect on Twitter: / flutterfactory
    🎷Music: www.bensound.com

Komentáře • 26

  • @ejikeezekwunem4162
    @ejikeezekwunem4162 Před 2 lety +4

    This is the easiest and most direct tutorial I found on Mobx. Thanks for sharing.

  • @TiagoJesusSousaGama
    @TiagoJesusSousaGama Před 2 lety

    Congratulations, The Flutter Factory! The clearest explanation I have seen so far! 🇧🇷😀

  • @t-damer
    @t-damer Před 3 lety +2

    Really good tutorial, I am learning react-native by creating todo app and it was really helpful to understand basics of storage management, also really fits usual project (I mean, projects that use useState and want to jump to MobX)

  • @derobpe1990
    @derobpe1990 Před 2 lety

    Have been troubling around with mobX and any video was helpful until I came across this video. I have follow all the tutorial using the git template. Not really onto comment on videos, but it really deserves it. Thank you for your time and for sharing! regards from Spain.

  • @ArifDewi1331
    @ArifDewi1331 Před rokem

    Thank man! Nice and clear! 👍

  • @mubin-ansari
    @mubin-ansari Před 3 lety

    Thanks a lot for this tutorial!

  • @kakarnyori5457
    @kakarnyori5457 Před 3 lety +1

    Very nice explanation! One thing I wanted to point out was that, mobx states are mutable. So you could just push the new item (in your case the superHero) to the item list.

  • @burakenaktas
    @burakenaktas Před 2 lety

    You are the superhero :D

  • @ywong9371
    @ywong9371 Před 3 lety

    Thanks for the great tutorial. It is really helpful. What if I want to have multiple stores? Should I use the same way to handle those stores? Or is there a better way to implement it?

    • @TheFlutterFactory
      @TheFlutterFactory  Před 3 lety

      There's no correct answer for that. It's up to you and how you feel need to architect your app.

  • @Guide4Ever
    @Guide4Ever Před 2 lety

    Passing Math.Random() seems very risky to pass as an Id since it can happen that Id will be duplicated in the future (crashes the app due to thrown error) - assuming you use that id with keyextractor ofc. I'd advise an increment approach since it guarantees ascending array of ids. What is your opinion?
    Nonetheless a very productive tutorial, learnt a lot. Also a beginner.

  • @ishaiyaish3207
    @ishaiyaish3207 Před 3 lety

    Hi, which emulator do you use for displaying the app?

    • @TheFlutterFactory
      @TheFlutterFactory  Před 3 lety

      It's just a random iOS emulator in Xcode. you can choose whichever you device you want in the IDE

  • @francescofreddi4374
    @francescofreddi4374 Před 3 lety +1

    mobX exists also for Flutter.......... :)

    • @TheFlutterFactory
      @TheFlutterFactory  Před 3 lety

      I never said it didn't 🙂.

    • @francescofreddi4374
      @francescofreddi4374 Před 3 lety

      ehmmmmm i know only Flutter.... i want to say... also in Flutter you will prepare this topic? really?

    • @TheFlutterFactory
      @TheFlutterFactory  Před 3 lety +1

      I don't think so. I doubt there will be much interest in mobx for flutter. Provider, GetX, and Bloc are all MUCH better options for state management in Flutter. They were built specifically for Flutter. Mobx was created for js and later ported to Flutter. (same with Redux)

    • @francescofreddi4374
      @francescofreddi4374 Před 3 lety

      @@TheFlutterFactory whats do you know better? Flutter or ReactNative... and now, whats the best for you?

    • @TheFlutterFactory
      @TheFlutterFactory  Před 3 lety +2

      Flutter is my favorite. It's just more fun. Flutter is also growing faster than react native.

  • @RandomCrap
    @RandomCrap Před 2 lety

    I loved mobx until they removed the decorators.. They made all of the coding 10000 times more tricky and overall a shitty solution.. They fucked up the library entirely