This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/app/stores/ErrorsStore.js
2017-11-10 14:14:30 -08:00

21 lines
332 B
JavaScript

// @flow
import { observable, action } from 'mobx';
class ErrorsStore {
@observable data = observable.array([]);
/* Actions */
@action
add = (message: string): void => {
this.data.push(message);
};
@action
remove = (index: number): void => {
this.data.splice(index, 1);
};
}
export default ErrorsStore;