This is a very simple example in how to use Mobx to manage state in React Native. Is important to install the Babel plugins so you can use the @ decorator.
- Clone this repo
git clone https://github.com/vtisnado/react-native-mobx-example
- run
npm install
to install all the packages or manually install Mobx withnpm i -S mobx mobx-react
- run
npm install babel-plugin-transform-class-properties --save
- run
npm install babel-plugin-transform-decorators-legacy --save
Finally run react-native run-android
to see the project in the emulator. Additional details can be found in the source code.
You can check this article to read about the differences between Mobx and Redux: https://www.robinwieruch.de/redux-mobx-confusion/)