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.
Files
outline/frontend/stores/ErrorsStore.js
2017-07-09 10:27:29 -07:00

19 lines
344 B
JavaScript

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