React Native Mobx Demo - Add item to list.

Опубликовано: 04 Июнь 2026
на канале: Fred Abijay
142
2

Very minimal React Native Demo using Mobx state management.

Preparation:
1. npx react-native init ListDemo
2. cd ListDemo
3. Edit android\gradle\wrapper\gradle-wrapper.properties file, change gradle-6.2-all.zip to gradle-6.4-all.zip
4. git init . (Optional. Only if you like using Git.)

Mobx:
5. yarn add mobx mobx-react
6. Create a folder called stores.
7. In the stores directory create a file called ListStore.js. Please see video for file contents.

React-Native:
8. Create three files: ListProvider.js, Item.js, and ItemList.js. Please see video for the contents of each file.
If you have watched my other videos about React state management, please be aware that in the file ItemList.js we have to use slice for the FlatList array. We did not have to do this in the other state management demos.
9. Edit App.js. Please see video for file contents.

Execute:
10. react-native run-android