Ditching setState for MobX

Ditching setState for MobX

How to leverage observables, observers, computed properties, autorun & more to supercharge & simplify your React workflow.

In late 2017 I worked on a React Native project with a team that had used MobX as their state management library.

I had worked quite a bit with MobX in the past, but this team took it to another level, & I have to say not only did I like their approach but I learned quite a bit by working on the project & with the new team.

One of the big things that was different for me was that they had entirely done away with setState to manage local state and were instead using MobX not only to manage external state, but also local state.

They were not just using observables & observers, but were also using computed properties, autorun, & all that the framework has to offer.

Read more...

要查看或添加评论,请登录

NADER Dabit的更多文章

  • The Cloud is Your Development Environment

    The Cloud is Your Development Environment

    As a developer, one of the things I've grown accustomed to is constantly moving between various projects, their…

    1 条评论
  • React Native Authentication in Depth

    React Native Authentication in Depth

    Implementing real world production tested multi factor authentication in a React Native application. This tutorial uses…

  • State Management with MobX State Tree

    State Management with MobX State Tree

    Introduction to MobX State Tree To see a completed React Native example using MobX State Tree and our example…

  • AWS AppSync?—?Up and Running with GraphQL in the Cloud

    AWS AppSync?—?Up and Running with GraphQL in the Cloud

    The AWS AppSync GraphQL service offers real-time updates and built-in offline support along with first class…

    1 条评论
  • React Native & iPhone X

    React Native & iPhone X

    Easily update and create iPhone X layouts with SafeAreaView In version 0.50.

  • Flutter for JavaScript Developers

    Flutter for JavaScript Developers

    Flutter is a cross-platform mobile app SDK for building high-performance, high-fidelity, apps for iOS and Android, from…

  • React Native - Cross Platform & Beyond

    React Native - Cross Platform & Beyond

    I have had the tremendous opportunity to speak at the only two React Native conferences in the world so far, both Chain…

    2 条评论
  • Deep Linking Your React Native App

    Deep Linking Your React Native App

    In this post, I’ll quickly walk through how to add deep linking to a React Native app for both iOS and Android using…

  • Introducing Create XP App

    Introducing Create XP App

    I've just released an open source project that will allow developers to leverage the ReactXP ecosystem much easier to…

    2 条评论
  • Managing State in React and React Native using ReSub

    Managing State in React and React Native using ReSub

    ReSub is a library released by Microsoft + Open Source for writing React components that automatically manages…

社区洞察

其他会员也浏览了