Check out example codes for "mobx example class". It will help you in understanding the concepts better.

Code Example 1

import 'package:mobx/mobx.dart';

part 'defect_store.g.dart';

class DefectStore = DefectMobx with _$DefectStore;

abstract class DefectMobx with Store {
  @observable
  dynamic completeDefects = [];
  @observable
  dynamic incompleteDefects = [];

  @action
  void updateCompleteDefects(value) {
    completeDefects = value;
  }

  @action
  void updateIncompleteDefects(value) {
    incompleteDefects = value;
  }
}

Learn ReactJs, React Native from akashmittal.com