frontend > app
This commit is contained in:
18
app/stores/ErrorsStore.js
Normal file
18
app/stores/ErrorsStore.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// @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;
|
||||
Reference in New Issue
Block a user